Solar energy company SunEdison Inc. said on Friday it was in talks for potential debtor-in-possession financing with some of its first- and second-lien lenders.

SunEdison said it needed about $310 million to stay in business, estimating a cash shortfall of $260 million by mid-June.

The company's shares, which have lost nearly all of their value in the past 12 months, were down 37 percent at 37 cents Friday afternoon.

SunEdison said it expected to secure the financing by pledging assets, including those of its units.

Typically, companies enter into debtor-in-possession financing after they file for bankruptcy protection to maintain liquidity while they reorganize.

Analysts said that while the decision to seek debtor-in-possession financing did not necessarily mean the company would file for bankruptcy, it was likely that this would happen soon.

"It is definitely a sign that they are thinking about it because they are trying to get the arrangement in place before they file," said Ian Feng, an analyst at credit research firm Covenant Review.

SunEdison, which had debt of about $12 billion as of Sept. 30, laid out three scenarios to continue in operation. Two included bankruptcy expenses of more than $70 million.

The company said it entered into confidentiality agreements with lenders on March 17. 

SunEdison's so-called yieldcos, created to hold its renewable energy assets, hired financial and legal advisors to help them prepare and develop contingency plans in case SunEdison files for bankruptcy, a spokesman for the yieldcos said on Friday.

The companies, which have no employees, rely on SunEdison to make interest payments for them and for back office functions.

Debtwire first reported in March that SunEdison was in talks with holders of its second lien loans to fund a DIP facility.