Tesla’s narrative in recent months is something akin to a daytime TV soap opera, full of crisis, head-scratching plot twists and never-ending drama that leave loyal viewers wondering if everything will turn out all right in the end for the show’s hero.

A day after shares of the electric-car maker had a euphoric 17% spike on news that CEO Elon Musk reached a settlement with the Securities and Exchange Commission that strips him of his board chairmanship but keeps him in the top job, the market was unimpressed by Tesla’s record production in the third quarter, which included a surge in Model 3 sedan deliveries. Tesla fell 3% to $301.02 in Nasdaq trading on Tuesday.

The Palo Alto, California, company said on its website that it got 55,840 Model 3s to customers during the quarter, some of whom have waited more than two years, and a best-ever 83,500 vehicles in total, including premium Model S sedans and Model X crossovers. But Model 3 production, although remaining near the 5,000-unit-a-week pace that’s critical to Tesla’s promised profitability, didn’t reach the 6,000-a-week rate the company targeted at the end of the second quarter.

Additionally, the company is feeling pain in China as a result of President Donald Trump’s trade fight with that country.

“Those trade tensions have resulted in an import tariff rate of 40% on Tesla vehicles versus 15% for other imported cars in China,” the company said.

Tesla scrambled in the final weeks of the quarter to get vehicles to customers, running into a what Musk called “logistics hell” that was due in part to a shortage of car carriers needed for delivery. Tesla also accepted assistance from current owners who volunteered to help explain vehicle features to new buyers picking up cars at company facilities.

Baird Equity Research analyst Ben Kallo estimates that the Model 3 build pace was just 4,100 units per week during the quarter. “Average production was likely impacted by downtime, but increased substantially from Q2,” he said in a research note. Still, the company’s shift to higher-margin Model S and X vehicles and pricier dual-motor Model 3s bodes well for earnings.

“We believe TSLA could achieve its guidance of being GAAP net income and cash-flow positive during the quarter,” said Kallo, who has an “Outperform” rating on the shares.

Production in the quarter totaled 80,142, including 53,239 Model 3s.

The SEC’s lawsuit filed last week against Musk alleged that he committed securities fraud in his tweets about taking Tesla private. That triggered investor panic that sent the shares tumbling about 15% on September 28 as, among other punishments, the regulatory agency sought Musk’s ouster as CEO. The company last month abandoned the privatization plan, which on closer scrutiny didn’t appear to have secured the funding needed to move forward, as Musk had claimed on Twitter.

The 47-year-old billionaire, who is intertwined with Tesla’s ambitions, routinely camped out at its Fremont, California, auto plant throughout the quarter to aid with the production push. In a second-quarter results call, Musk said he expected Tesla to be profitable in the second half 2018 on rising Model 3 sales.

That would be a remarkable achievement for a company that’s never been profitable on an annual basis since its 2010 IPO and reported net income in just two, nonconsecutive quarters. Musk noted this to fire up and thank Tesla employees in a weekend email as they scrambled to deliver as many cars as possible in the quarter’s final days.

“We are very close to achieving profitability and proving the naysayers wrong, but, to be certain, we must execute really well tomorrow (Sunday),” he said in the September 29 message. “If we go all out tomorrow, we will achieve an epic victory beyond all expectations. Go Tesla!!!”

Notably, on the heels of its run-in with the SEC, Tesla posted that internal company message as an SEC filing on October 1.

The full impact of Tesla’s China business remains to be seen, but its ability to expand production is significant, said Jeremy Acevedo, who manages industry analysis for car-shopping site Edmunds.

"Today’s production announcement offers a bit of redemption to the Tesla faithful. It’s refreshing to see the company making headlines for producing cars, not controversies,” he said in e-mailed comments. “Between the makeshift tent, extra shifts and Elon's all-nighters at the factory, it hasn't exactly been a traditional path getting here, but make no mistake that producing 50,000 Model 3s in Q3 is a significant milestone.”

Now the question is whether the company can keep it up. We’ll have to stay tuned.

I write about technology-driven changes that are reshaping transportation and cities from Los Angeles, the U.S. capital of cars and congestion. I've covered global automakers, advanced vehicle tech and environmental policy for two decades, including 15 years with Bloomber...