BP, an oil giant formerly known as British Petroleum, ran an ill-fated marketing campaign some years ago proclaiming itself “Beyond Petroleum”. The idea was to trumpet its big investments in renewable energy, especially its brief position as one of the world’s biggest manufacturers of solar panels. That effort came to be seen as greenwash as punters realised that the company’s dabbling in greenery did not take away its zeal to produce—and alas, it turned out, recklessly spill—gargantuan quantities of the mucky black goop that has always been the main source of its profits. Not long after that, Suntech, a Chinese solar-panel manufacturer, skyrocketed to the top of the world solar industry. So stratospheric was the rise in the firm’s valuation after it went public in 2005 that Shi Zhengrong, its founder, was briefly China’s richest man. At the peak of his wealth and his company's prospects, he grandly even declared his ambition for Suntech to become as big as BP.

As a clean-energy company, Suntech at least had the chance to fulfil BP’s misleading promise of going beyond petroleum. Alas, Suntech has instead ended up beyond profit.

The company’s solar-panel operations in Wuxi, China, were declared bankrupt on March 20th. That came just days after it defaulted on some of its bond obligations. Suntech has been shutting down various facilities worldwide and Mr Shi, who once was a green hero among the fat cats who gather at the World Economic Forum’s annual Davos gabfest, has been ignominiously booted out of his job as company chairman.

What happened? Partly, Suntech is a victim of circumstances. The global solar industry boom of recent years has turned, inevitably and painfully, into bust. Subsidies lavished by Chinese officials encouraged over-production by local manufacturers, helping to produce a glut on world markets even as their cut-price tactics wiped out rich-world rivals and prompted reprisals in the form of anti-dumping duties and other threatened retaliation.

Just as pernicious were the stop-go policies in rich countries that variously subsidised solar-energy production and consumption, and then stopped doing so. So dire is the industry-wide crisis that, on one estimate, over 30 solar firms have gone bust globally of late. Clearly, any company, never mind the world’s largest, would find it hard to survive in such an environment.

However, Suntech and Mr Shi also have plenty to answer for in this sorry tale. There are accusations of mismanagement, as well as worrying suggestions of financial impropriety. China Daily, an official government publication, suggested that the company got in trouble in part because “a business partner faked $680m in collateral for a loan Suntech had guaranteed.” Mr Shi and Suntech have denied any wrongdoing.

What is undeniable is the fact that Suntech over-expanded, including into expensive manufacturing facilities in America, at precisely the moment it should have reined in its ambition. Some hope that it will use its bankruptcy filing to reorganise and emerge in slimmer shape. However, the board’s recent ouster of Mr Shi from the top job, and the ongoing bitter wrangling among all involved, hardly inspires confidence that the company will see better days any time soon.

What next? If past experience is a guide, China’s leaders may not allow the world’s largest solar bankruptcy to tarnish their ambitions of becoming a clean-tech powerhouse. Nor will they likely let its financial troubles lead to unrest resulting from massive sackings of workers. Unconfirmed rumours are swirling that the local government in Wuxi is already organising some sort of bail-out. One thing is for sure: even if a rescue package is organised, foreign investors are going to lose a packet.