Tesla Inc. (TSLA) - Get Report shares surged higher Thursday, setting up the best single-day gain in six years, after the clean energy carmaker posted a surprise third quarter profit and reaffirmed delivery targets for the full year. 

Tesla earned 80 cents per share over the three months ending in September on a GAAP basis, well ahead of the Street consensus of a 23 cents per share loss, even as revenues fell 7.6% to $6.3 billion, modestly shy of analysts' estimates. On a non-GAAP basis, Tesla earned $1.86 per share, down 35.8% from last year but obliterating the consensus estimate of a 42 cents per share loss.

Tesla also said it was "highly confident" it could top the low-end of its its earlier forecasts of delivering between 360,000 and 400,000 cars this year as production rates in its new Shanghai factory run ahead of schedule.

"Q3 was obviously a very strong quarter and we had record deliveries, we're able to make great strides and controlling our costs," founder and CEO Elon Musk told investors on a conference call late Wednesday. "We shifted back to GAAP profitability while also generating strong free cash flow. And again, this would not be possible without each employee doing their part to reduce cost. Our operating cost is now at the lowest level since Model 3 production started."

Tesla shares were marked 18.8% higher at the start of trading Thursday to change hands at $302.85 each, the highest since March 4 and a move that would trim the stock's year-to-date decline to around 9%.

Digging into Tesla's beat, it's hard to find much at first blush to be disappointed with. Tesla, to its credit, put up positive GAAP net income - which few, if any, expected," said Credit Suisse analyst Dan Levy. "And not only that, but the result didn't appear to be propped up by any one-time items. Rather, it largely came from better-than- expected auto gross margin and lower-than-expected opex."

"Unsurprisingly, the stock is up rather sharply in after-hours trading (likely reflecting short covering)," Levy added. Yet the question moving forward is on the sustainability of the results. Our take - a strong step forward, yet Tesla will need to put together a string of similar datapoints to demonstrate the sustainability of results ... and its track record has been spotty on this."