Results come after Elon Musk’s electric car company lost $1.1bn during the first half of 2018

Tesla rebounded from a rocky start to the year when it reported a surprise third-quarter profit of $143m on Wednesday, sending its stock price soaring more than 17% in after-hours trading.

The electric automobile company’s revenues of $6.3bn narrowly missed analyst expectations, but adjusted earnings per share of $1.86 far exceeded expectations that the company would continue losing money.

The company attributed the turnaround to cost control efforts, noting that “operating expenses are at the lowest level since Model 3 production started”. It also claimed to have “dramatically improved the pace of execution and capital efficiency of new production lines”.

Tesla shares tumble amid $408m loss and another high-profile departure Read more

“Super proud of Tesla team for great execution & support of Tesla customers greatly appreciated!!” tweeted the chief executive, Elon Musk, about the results.

The positive results came after Tesla lost $1.1bn during the first half of the year. That had caused many investors to lose faith in the company even as it boosted sales of its vehicles.

Doubts about Tesla forced its stock to fall by 23% so far this year, while the bellwether Standard & Poor’s 500 index has climbed 20% so far. But Tesla’s shares recovered a big chunk of those losses after its third-quarter numbers came out. Analysts surveyed by FactSet had projected Tesla would lose about $253m during the third quarter.

Instead, Tesla delivered a “jaw dropper”, said the Wedbush Securities analyst Daniel Ives. “The street wanted profitability and Tesla delivered in big fashion.”

“We are highly focused on decisions that really make a material difference to the company, such as opening Gigafactories on other continents,” Musk said on an unusually restrained conference call with investors.

The billionaire’s erratic behavior, including his infamous tweet that he planned to take the company private and baseless allegations of pedophilia against a volunteer rescue worker, have long dogged the company and resulted in investigations and fines.

Development of the company’s new factory in Shanghai is ahead of schedule, Musk boasted, and trial production has already begun. He said the company will announce the location for a factory in Europe before the end of the year.

Musk also advanced the timeline for production of the Model Y, a crossover SUV that was first unveiled in March, to summer 2020.

Despite the strong quarterly performance, Tesla will almost certainly post yet another annual loss this year, just as it has done every year since its initial public offering in 2010. Since then, Tesla has amassed more than $5.5bn in losses.

More financial potholes could still be looming on the road ahead as Tesla faces increasing competition, with more automakers rolling out their own electric vehicles to cater to the growing number of consumers looking for alternatives for fuel-burning vehicles. Many of those automakers will be able to take advantage of alluring tax incentives that are now being phased out for Tesla because of its head start in the field.

“We have passed peak Tesla, it has already seen its best days,” asserted David Kudla, the chief investment strategist for Mainstay Capital Management, a financial advisory firm that focuses on the auto industry.

Nicholas Hyett, an equity analyst at Hargreaves Lansdown, also warned of potential challenges to future demand. “The price of Teslas may be lower than in the past, but they’re still a big ticket, comparatively premium product,” he said. “That’s not a category that holds up well in a downturn – and the economic landscape is hardly rosy.”

Agencies contributed reporting