Tesla on Wednesday reported better-than-expected sales for its first quarter, despite having its vehicle production affected by shutdowns at its factories in Fremont and Shanghai due to the worldwide coronavirus pandemic.

After U.S. stock markets closed, Tesla said sales for the months of January, February and March totaled $5.99 billion, up from $4.54 billion in the same period a year ago. Wall Street analysts had forecast Tesla to report sales of $5.9 billion.

Tesla also said it earned $1.24 a share, excluding one-time items, compared to analysts’ expectations for a loss of 36 cents a share.

The quarter included Tesla making the first deliveries of its new Model Y crossover vehicle, which the company builds at its factory in Fremont.

“Tesla didn’t post a massive profit, but considering the circumstances, it’s a positive sign that the company managed to do so at all,” said Jessica Caldwell, executive director of insights at auto industry researcher Edmunds. “Model Y sales should help keep Tesla in a healthier place financially.”

Tesla said it produced 102,672 vehicles, and delivered 88,496 cars during the quarter, a period that included a temporary shutdown of its facility in Shanghai in February, and the closing of its Fremont factory in late March. Tesla’s Fremont plant remains closed under the current shelter-in-place order covering Alameda County and other Bay Area counties.

“(Chief Executive Elon) Musk and his red cape did it again this quarter,” said Dan Ives, managing director at Wedbush Securities. “The profitability picture was much better than feared.”

Reaction to Tesla’s results was roundly positive, as Tesla’s stock price rose by 10%, to $880.03 a share in after-hours trading.

The company was somewhat cautious about how it expects the ongoing coronavirus crisis to impact its business in the coming months. Tesla didn’t give a sales outlook for either its current quarter, or all of 2020, and said it was ” difficult to predict how quickly vehicle manufacturing and its global supply chain will return to prior levels.”

But, Tesla also hinted that despite the interruptions in its production lines, it still has the manufacturing capacity to surpass its prior goal of building 500,000 vehicles worldwide this year. The company pushed back the first deliveries of its electric semi truck until 2021.

Prior to Tesla’s report, Musk had garnered attention following a series of tweets in which he said it was time to “free America now” from the shelter-in-place lockdowns that have closed many businesses in California and across the country.