New York (CNN Business) Over the last 10 years Tesla CEO Elon Musk has been promising Wall Street that his electric car company would eventually make money.

Wednesday he finally made good on that promise. Shares closed up 9% Thursday after the company posted its best quarter ever the previous evening.

The big question now is whether the company can remain profitable.

Tesla's strong report showed that overall manufacturing costs for each vehicle declined by 30%. The number hours it takes to build each car fell too.

That was enough for skeptical Tesla analyst Garrett Nelson to change his tune.

"The results look to be sustainable going forward," the CFRA Research analyst said.

Nelson upgraded his recommendation on the stock after the earnings report. He said he is now confident that Telsa will be able to continue to reduce its costs.

Tesla's ( TSLA ) stock had lost about a third of its value since hitting a record high of $385 a year ago.

The stock has been dogged by concerns that the company couldn't hit production targets, was burning through too much cash and was facing looming debt payments.

Musk promised investors for months that the company would be profitable in the second half of 2018, but Wall Street had become very skeptical.

"We had our doubts," Nelson said. "This is a company that has a long history of overpromising and under delivering."

Tesla's profitability comes just in the nick of time because $1.7 billion in debt is due by November of next year.

The company that was burning through funds reported that its cash reserves increased by $731 million during the quarter.

Musk told analysts that going forward, his company will be adding to its cash reserves instead of burning through money to boost production.

"I said before that we must prove that Tesla can be sustainably profitable," he told analysts Wednesday. "This quarter was an important step towards that and I'm incredibly excited about what lies ahead."

Gene Munster, a leading tech analyst with Loup Ventures, said its good to see the focus return to Tesla's business and not on Musk's erratic behavior.

Musk also drank alcohol and smoked pot on a podcast, maligned a man who helped in the rescue of a Thai soccer team trapped in a cave, and lambasted analysts on a conference call.

The behavior spooked many investors, and Munster said he's not sure the great quarter will be enough by itself to convince everyone that the company is a safe investment.

"I think it was the important step they've taken, but we're not out of the woods yet," Munster said.

Morgan Stanley auto analyst Adam Jonas, who still has a neutral rating on the stock, said that he and other investors will want to see Tesla repeat this performance in the fourth quarter and beyond before the stock can regain some of the ground it lost in the last year.

But even one of Tesla's harsher critics has said he expects that Tesla's stock will now start to regain lost ground. John Thompson CEO of hedge fund Vilas Capital Management, said he has now closed his short positions which bet on a continued decline in the price of the stock.

"My estimates of their demise have been greatly exaggerated," he said. "In the long run it doesn't change anything. But in the short run they've pulled the rabbit out the hat."