A RECENT tweet from Elon Musk, the boss of Tesla, an electric-car firm, shows footage of a Model X undergoing rollover testing. The SUV is propelled rapidly sideways on a trolley before encountering a sand trap that stops it suddenly, tipping the car. The Tesla teeters between ending up on its roof or settling back on its wheels. It is an apt metaphor for a firm hovering between fulfilling its promise and succumbing to financial woes.

In April Adam Jonas of Morgan Stanley, a bank, said the next three months would be the “most critical time in Tesla’s history” since launching its upmarket Model S six years ago. The move from a niche in expensive electric cars to bringing battery power to the masses has been troublesome, to say the least. The firm had once hoped to be making 10,000 of its cheaper Model 3s a week by the end of 2018. But difficulties with a highly automated production line mean that just over 2,000 are rolling out of the factory each week. Even a revised goal of 5,000 looks distant.

As a result, cash is draining away. So are top executives. Around 20 have departed since the start of 2017. Crashes involving the firm’s Autopilot self-driving system have put dents in its reputation. It all appears to be weighing on Mr Musk. On May 2nd, in a peculiar earnings call, he dismissed sensible questions from Wall Street analysts about production problems and cash burn as “dry”, and labelled one analyst asking about Tesla’s need to raise money a “boring bonehead”.

The stream of bad news has hit Tesla’s shares, which have fallen by 28% from their peak in September 2017. Several stock analysts reckon the firm will soon run out of cash and will need to raise another $2bn or more this year. Goldman Sachs, a bank, goes further, estimating that introducing new products such as the Model Y, a smaller SUV, and an electric lorry, together with refinancing debt, will require raising $10bn by 2020. The bank adds that its production problems could see Tesla’s shares slide by around a third over the next six months.

Tesla is still more valuable than Ford, but if the slump continues it could become an inviting target. The question then is, for whom? An existing carmaker could put right Tesla’s difficulties in churning out Model 3s to satisfy the more than 450,000 people who have put down a deposit. A few years ago, before Tesla’s share price soared, rumours circulated of a bid from one of the German premium carmakers. But now all of them have competing cars in the works. A mass-market firm which has made less progress on electrification, such as Fiat Chrysler Automobiles (whose chairman, John Elkann, sits on the board of The Economist’s parent company), might be interested if the price were sufficiently low.

A big technology firm might also be a suitor. Apple was once said to have an eye on Tesla, before hatching and then abandoning plans to make cars itself. It is under pressure to find a new hit product, is developing autonomous technology and has pockets deep enough to buy Tesla even if the share price takes less of a tumble than many expect. Waymo, the self-driving car unit of Google, might also want to own hardware to complement its own autonomous-driving software.

China’s tech titans may regard it as a desirable asset, too. Both Tencent, which already has a 5% stake in Tesla, and Baidu are investors in NIO, one of the more plausible contenders among a slew of Chinese-backed competitors such as Faraday Future and WM. Along with Alibaba, Chinese firms are putting large sums into developing electric vehicles, autonomous driving and mobility services. Japan’s SoftBank also has plenty of cash, likes investing in more mature tech businesses and encourages synergies among firms in its stable. As these include Uber and Didi, two ride-hailing firms, Tesla would be a useful addition.

Or perhaps Mr Musk could realise another plan. “I wish we could be private,” he told Rolling Stone in November. If Tesla were cheap enough, perhaps SpaceX, his private rocket firm, could acquire it much as in 2016 Tesla bought SolarCity, a struggling energy business that also counted him as its biggest shareholder. Tesla might need to rein in its ambitions if it went down this path. But Mr Musk would get some respite from bores and boneheads.