New York CNN Business  — 

Tesla shrugged off coronavirus-related problems and posted a profitable first quarter.

The electric car maker earned net income of $16 million, while income excluding special items, such as stock based compensation, came in at $227 million. The company lost money on both those measures in the year-earlier quarters.

Analysts surveyed by Refinitiv had forecast the company would post a narrow loss due to the shutdowns of its factories in California and Shanghai at times during the quarter and a drop in completed vehicle sales compared to the fourth quarter of last year.

Shares of Tesla (TSLA) jumped 9% in after-hours trading on the report. Shares have now more the doubled since the start of the year, even if they have come down from the all-time high reached in mid-February before coronavirus concerns hit the broader market.

Still, the company said it couldn’t promise that its unexpected profit will continue in the face of disruptions caused by the Covid-19 outbreak.

“It is difficult to predict how quickly vehicle manufacturing and its global supply chain will return to prior levels,” Tesla said in a statement to investors. “Due to the wide range of potential outcomes, near-term guidance of net income and free cash flow would likely be inaccurate.”

Although it did not offer specific guidance, the company did say, “While near term profit guidance is on hold, we believe we will achieve industry leading operating margins and profitability.” It said it has the capacity to build 500,000 vehicles this year, even with the production interruptions. Tesla said it had been on course to have its best sales quarter in its history before it had to suspend operations in California because of the outbreak.

Tesla’s numbers impressed experts, even if they warned that the company will have a tougher time in the current period.

“The first quarter financial numbers suggest the automaker has turned a corner and is making serious headway on its business model,” said Karl Brauer, executive publisher at Kelley Blue Book. “As brands go, Tesla’s is one of the strongest in the automotive industry. And that kind of brand equity is a company’s best defense during economic turmoil. It’s likely Tesla will prove more resilient than other automakers in terms of 2020 sales. But ‘more resilient’ doesn’t mean immune, and Tesla’s first quarter success story will be difficult to repeat in the coming months.”

The profit marked the first time in the company’s history that it posted positive net income in three consecutive quarters. In fact, through the middle of 2018, the company had only posted two profitable quarters in its entire history.

But this marks the fifth profitable quarter out of the last seven, and it suggests that the upstart electric car maker has turned a corner on its profitability. Last year was the first year it achieved an annual profit when excluding special items. Tesla had said in January, before it was faced with disruptions, that it expected to be profitable on an ongoing basis.

The company was able to avoid the types of growing pains that produced losses in the past. It said the Model Y, its new lower-priced SUV that it expects will become its best-selling vehicle, has already achieved a gross profit margin in the quarter despite only starting production in January. It’s the first time it made a profit on a car in its first quarter on the assembly line.

Tesla said that gross margins on the Model 3 sedans being built in its Shanghai factory, which only opened in late 2019, are already approaching the margins at the California factory.

The company did have one bit of bad news, announcing it is pushing back the planned start of production of a semi-tractor that had been set to begin later this year to 2021. It did not give a reason.

Tesla did not break out the cost of the shutdown of its plants due to coronavirus concerns in its statement to investors. CEO Elon Musk has been critical of many of the steps taken to battle the Covid-19 outbreak. Tuesday night he tweeted “FREE AMERICA NOW.”

During his call with investors Wednesday evening, Musk railed against the government orders shutting down non-essential businesses, particularly in the Bay Area where his Fremont plant is located.

“We are a bit worried about not being able to resume production in the Bay Area, and that should be identified as a serious risk,” he said. He pointed out that Tesla has only two car factories, including the one China, and the one in Fremont makes the overwhelming majority of its cars.

“While Tesla will weather the storm there are many small companies that will not,” Musk said. “Everything people have worked for their whole life is being destroyed in real time. Many suppliers are in super hard times, especially the small ones.”