FREMONT (CBS SF/AP) — Tesla surprised investors and managed to eke out a small first-quarter net profit just as the coronavirus started to affect the electric car and solar panel maker.

The company announced Tuesday, that it made $16 million from January through March, or 8 cents per share. It was the third straight profitable quarter for the Palo Alto-based automaker.

Excluding one-time items, Tesla earned $1.24 per share. Some analysts had predicted losses of 28 cents a share.

In the latest shareholders report, Tesla said first-quarter 2020 “was the first time in our history that we achieved a positive GAAP net income in the seasonally weak first quarter. Despite global operational challenges, we were able to achieve our best first quarter for both production and deliveries.”

It appears the virus is forcing Tesla to dial back its forecast to produce more than 500,000 vehicles in 2020. The company said it’s uncertain how quickly its California plant can ramp up after being shut down due to the virus.

According to CNN, Tesla built more than 100,000 cars in the first quarter, but delivered only 88,400.

The company had just started production the Model Y, a low-cost SUV “it expects could soon be its bestselling and most profitable vehicle.”

In its shareholder report, Tesla boasted building more Model Y models during Q1 2020, “than in the first 2 quarters of Model 3, in 2017.”

Authorities in Northern California have extended the shelter-in-place order through the end of May, so despite the positive Q1 performance, Tesla’s auto factory in Fremont will remain closed, for now.

Industry-wide, the COVID-19 pandemic has shuttered factories and showrooms, cost millions of jobs. Analysts predict the dramatic drop in gas prices may drive customers away from auto buying for a while, and reduced incentives for them to switch to electric cars.