SunEdison, which grew from making chemicals and components for solar modules to become a giant of the renewable energy business, is preparing for bankruptcy, according to a filing with regulators on Friday.

The filing signaled the potential end to SunEdison’s ambition to become the world’s leading renewable energy development company. And it comes after the fall of another clean energy company, Abengoa, which is going through proceedings in the United States and Spain as it seeks to avoid becoming that country’s largest corporate failure.

In the end, SunEdison’s fall offers a cautionary tale on the dangers of trying to grow in too many directions at once, analysts said.

“They got ahead of themselves,” said Walter Nasdeo, managing director at Ardour Asset Management, a clean energy investor. “It’s a mess.”