SunEdison filed for Chapter 11 bankruptcy on Thursday after its practice of making debt-fueled acquisitions proved unsustainable.

The company was once the fastest growing renewable energy company in the United States and focused on developing solar projects. According to filings the company had assets of $20.7 billion and liabilities of $16.1 billion as of September 30, according to Reuters.

Sunedison Inc (SUNE) Files Chapter 11 Bankruptcy

Bankruptcy does not apply to two yieldcos

SunEdison Inc (NYSE:SUNE) said that TerraForm Power and TerraForm Global, its two publicly traded subsidiaries, were not included in the bankruptcy.

Executives revealed that up to $300 million in new financing had been agreed with first-lien and second-lien lenders, pending court approval. The funds will support company operations during bankruptcy and will be spent on paying wages and vendors as well as continuing ongoing projects.

“Our decision to initiate a court-supervised restructuring was a difficult but important step to address our immediate liquidity issues,” said Ahmad Chatila, SunEdison chief executive officer. Chatila says that Chapter 11 will be used to drive down debt, cut down non-core operations and pursue greater value from technology and intellectual property.

Is the solar energy sector in trouble?

There remains strong demand for solar energy projects. However share prices have dipped due to concerns that weak oil prices could see a dip in demand.

SunEdison Inc (NYSE:SUNE) shares are no longer trading, but there last price was around 34 cents on the New York Stock Exchange. In July 2015 company stock was selling for as much as $33.44.

Other solar companies ticked up on the news, with First Solar seeing a slight rise and SolarCity shares trading up over 5%. An index of solar shares saw a 1% rise.

OppenheimerFunds golds an 11.9% stake in SunEdison Inc (NYSE:SUNE), and BlackRock Inc has a 6.5% stake. The Vanguard Group holds 6.4% and Adage Capital Partners has a 5.4% stake. Bankruptcy generally means that shareholders lose their investment.

The list of problems at SunEdison is a long one. Ambitious expansion in 2014 and 2015 meant that the company accrued huge amounts of debt, and last year’s $2.2 billion offer for Vivint Solar marked the point when investors began to lose confidence.

In March the cash-and-stock deal was terminated by Vivint after SunEdison failed to close. Shares in Vivint rose over 6% on Thursday.

The failed acquisition of Vivint led to lawsuits involving the listed subsidiaries that own and operate renewable energy assets, known as yieldcos.

Legal troubles mounting for SunEdison

Billionaire David Tepper‘s Appaloosa Management filed a suit to stop TerraForm Power buying some Vivint assets under the terms of the proposed takeover. Appaloosa has also made a legal bid to reform TerraForm Power’s Conflicts Committee. It claims that as TerraForm Power’s controlling shareholder, SunEdison has breached its fiduciary duties.

The failed deal for Vivint is also subject to an investigation by the U.S. Department of Justice and the U.S. Securities and Exchange Commission (SEC). Both bodies are also investigating SunEdison over other issues.

One of SunEdison’s yieldcos, TerraForm Global, has also filed a suit against its parent company citing breach of contract. TerraForm Global alleges SunEdison misappropriated $231 million of its cash.

According to TerraForm Global, SunEdison Inc (NYSE:SUNE) may not transfer solar energy projects in India and Uruguay to the yieldco and may also fail to complete some other deals. SunEdison is facing around two dozen lawsuits, the majority of which have been filed by shareholders who allege that the company misled them about its finances.

On two occasions the company delayed filing its annual report due to self-identified weaknesses in its financial reporting controls.

Financial issues have placed dozens of projects around the world in danger. Some of them have been sold, and the company is trying to get rid of others. Some projects are currently looking for new sources of financing.