Tesla proved its critics wrong in its latest set of financial results, unveiling an unexpected profit and record car deliveries, and announcing that it is ahead of schedule on a new model and a new plant.

The company made $1.86 (£1.44) per share in the third quarter, smashing analysts’ forecasts for a loss. It delivered 97,000 cars to customers in the period to 30 September, comfortably surpassing the previous record of 95,356.

Tesla now expects to launch the Model Y, an all-electric SUV, by the summer of 2020, months earlier than originally planned, and its new “gigafactory” in Shanghai has already started trial production. Manufacturing in China enables the carmaker to avoid import duties and offer lower prices in one of its most important markets.

Following the news on Wednesday, Tesla’s shares jumped nearly 21 per cent after market close to levels last reached in February.

“Tesla nails it at last,” said Neil Wilson, chief market analyst for Markets.com. The results stand in contrast to the repeated large losses the company has made since its inception. In the second quarter, Tesla reported a loss of $408m.

But Mr Wilson added: “In one sense, we shouldn’t get too excited”, noting the much smaller profit of $143m in the latest quarter and lower revenues compared with a year ago.

Tesla is pinning much of its hopes for sustained profitability on the Model Y. Chief executive Elon Musk said on Wednesday that the mid-size SUV could outsell the Model S, X and 3 combined.

SUVs have become very popular in the US, Europe and Canada, but most models still run on petrol, leaving Tesla to cater to consumers looking for an all-electric alternative.

Tesla’s earnings improved partly thanks to the recognition of deferred revenue from its “Smart Summon” feature, which allows drivers to call for their car to pick them up using a smartphone app.

US federal safety regulators are examining the feature as videos have appeared online showing driverless Teslas running into obstacles or nearly hitting other cars.

Mr Musk said on Wednesday that software updates over the coming weeks would improve Smart Summon.

The company also stuck to its earlier forecast that it will deliver over 360,000 vehicles in the year as a whole.