DETROIT (AP) -- Electric car maker Tesla reported a narrower loss for the second quarter on Wednesday, sparking an after-hours rally in its stock.
The Palo Alto, Calif., company reported after the close of trading on Wall Street that it lost $30.5 million, or 26 cents per share, in the April-June period. That compares with a loss of $105.6 million, or $1 per share, a year earlier.
Excluding one-time items and lease accounting, Tesla Motors Inc. said it had a profit of 20 cents per share. The one-time items included a $16 million charge associated with the payoff of a $465 million loan from the U.S. Department of Energy. Tesla paid off the loan in May, nine years earlier than it was due.
On that basis, analysts had expected a loss of 19 cents per share, according to FactSet.
Revenue rose to $405.1 million from $26.6 million a year ago. That beat analysts' forecast of $386.9 million.
"Our financial position and balance sheet have never been stronger," Tesla Chairman and CEO Elon Musk said in a letter to shareholders.
Tesla's stock was up $17.61, or more than 13 percent, to $151.84 in extended trading.
Musk said the company ended the quarter with $750 million in cash. It recently used some of that money to buy 31 acres next to its Fremont, Calif., plant for future expansion. It also expects to accelerate development of its next vehicle, the Model X crossover, as well as a right-hand drive version of the Model S in the second half of this year. The Model X is expected to go on sale next year.
Tesla currently makes one car, the $70,000 Model S, which won Consumer Reports' top rating in July. The company delivered 5,150 Model S sedans in the quarter, surpassing its expectation for 4,500.
In a letter to shareholders, the company said it remains on track to deliver 21,000 cars worldwide this year. Tesla delivered the Model S to its first European customers this week.
The company said it opened seven new stores in the second quarter for a total of 41 locations worldwide, including 30 in North America. Tesla expects to open its first store in China later this year.
The company's shares are four times higher than they were at the start of this year. They jumped more than 74 percent in early May after the company reported its first-ever quarterly net profit in the first quarter. They rose again in late May after the company announced plans to expand its nationwide network of charging stations
Tesla was founded in 2003 and went public in 2011 but has yet to turn an annual profit.