"We are sad to report that Tesla has gone completely and totally bankrupt." So tweeted Elon Musk, boss of the electric-car company, on April 1.

He even posted a picture of himself supposedly drunk and inconsolable as proof.

It was meant as an April Fools' Day joke, but the gag backfired. It is uncomfortably close to the truth.

The United States' leading manufacturer of electric vehicles is under pressure. Musk is fighting battles on many fronts and they all exacerbate his main threat: a financial squeeze that could eventually push Tesla over the edge.

Even Tesla's shareholders, who are rarely put off by bad news, are jittery. Its shares have fallen by 16 percent since the end of February, most steeply after a Tesla using the firm's Autopilot software crashed into a barrier in California on March 23, killing the driver and raising questions about the safety of its system for semi-autonomous driving. The crash is being investigated.

The pileup of woes continued on March 28 when a judge in Delaware decided to let a shareholder lawsuit proceed against Musk and Tesla's board over an alleged breach of duty involving the firm's $2.6 billion takeover in 2016 of SolarCity, a troubled solar-energy firm run by Musk's cousins.

And on March 29, the firm announced a recall of around 123,000 older vehicles that may be susceptible to corrosion of a bolt that affects steering and parking. Such recalls are common among the world's carmakers. But in Tesla's case it reinforces a view that the company is much better at developing the whizzy technology that underpins its cars than at mastering the humdrum business of making them in quantity.

Until recently, Tesla made only small numbers of expensive long-range battery-powered cars. Its Model S starts at $74,500 and its Model X sport-utility vehicle is pricier still.

But Musk has bet the future of his firm on mass-producing cheaper cars. The new Model 3, a smaller vehicle costing as little as $35,000 with a range still exceeding 220 miles, has attracted more than 400,000 deposits of $1,000 each from eager customers. Much of his firm's expected future revenue and its lofty valuation (it stands at roughly $49 billion today, even after the share-price falls) depends on rapidly scaling up production.

Alas, Tesla has repeatedly failed to meet its own targets. In July 2017, Musk claimed that his firm would be cranking out 20,000 Model 3s per month by December. In fact, it managed to produce fewer than 2,500 in the entire final quarter of 2017. He vowed to produce 2,500 Model 3s a week by the end of March, rising to 5,000 a week by the end of June.

Despite superhuman efforts by workers and managers (Musk is personally supervising production of the new model and claims to be sleeping at the factory), Tesla said it is producing only around 2,000 Model 3 sedans a week.

Expectations were so low among analysts and investors that Tesla's flagging share price rebounded after that announcement. Glossing over the fact that it has yet again failed to hit its promised target, the company boasted that the Model 3 assembly line is now providing "the fastest growth of any automotive company in the modern era." If Tesla's production growth rate continues, it claimed, "it will exceed even that of Ford and the Model T."

Such bluster does not withstand scrutiny.

Tesla is struggling with bottlenecks in the production of battery packs at its "gigafactory" in Nevada as well as with assembly of the Model 3 at its car plant in Fremont, Calif. The central problem is that Musk has overcomplicated the already difficult task of making a mass-market car.

Rather than relying on the time-tested manufacturing methods used by established rivals, who still use people to do tasks that machines are as yet unsuited for, he wants his car factory to be a hyper-automated "machine that makes machines," bristling with robots and keeping human involvement to a minimum.

Employees at the Fremont plant describe a chaotic workplace in which Silicon Valley ideals of nimble innovation and robotic automation clash with the unglamorous realities of car-making, from the safe use of forklift trucks on the shop floor to the dexterous insertion of plastic parts in car interiors.

Max Warburton at Bernstein, an equity-research firm, argues that the big global carmakers have realized — owing to bitter experience with overzealous previous attempts at automation — that a sensible mix of man and machine produces the most efficient car-assembly for the time being.

Even if Musk's dream of turning his factory into an "alien dreadnought" of automated mass production really points to a better way of making cars, he could run out of money before proving his case.

Tesla lost more than $2 billion in 2017. Well before it confirmed the latest missed production target, investors worried about the firm's cash-burn rate in 2018.

In addition to the $2 billion or so of capital that may be required to expand production of the Model 3, Tesla has $1.2 billion in convertible debt maturing by early next year. On March 27, Moody's, a credit-rating agency, downgraded Tesla's debt, cautioning that the firm "will likely need to raise additional capital during the second half of 2019." Jefferies, a bank, predicts that Tesla will need $2.5 billion to $3 billion this year.

Tesla maintains that there is no imminent cash crunch. On April 3, the firm insisted that it "does not require an equity or debt raise this year, apart from standard credit lines." Others think the moment of truth could come much sooner, perhaps in the summer.

Whenever it arrives, the question is in what kind of environment Tesla will raise money. Rising interest rates, a wobbly share price and a continued inability to meet its own production goals would all conspire to make it harder for the firm to find capital. It does not help that General Motors, Volkswagen and other big rivals are making massive investments in EVs.

Many shareholders retain their belief in Musk's ability to overturn conventional wisdom. But many short-sellers are still betting on the firm's demise and fixed-income investors, who tend to be more interested in getting their money back than changing the world, are becoming antsier.

The price of Tesla's junk bonds is well below the level at which they were issued last year. In another tweet last week, Musk wrote, "Car biz is hell."

This time he wasn't joking.