PALO ALTO, Calif. (AP) — Tesla Motors Inc. said its net loss widened as it more than doubled spending on research and development.

The loss was $65.1 million, or 63 cents per share, for the quarter that ended Sept. 30. During the same period a year ago it lost $34.9 million, or 38 cents per share.

Revenue jumped almost 85 percent to $57.7 million, from $31.2 million a year ago.

Excluding one-time items, the company said it lost $57 million, or 55 cents per share. Analysts surveyed by FactSet had been expecting an adjusted loss of 61 cents per share on revenue of $48.9 million.

Tesla's shares rose $1.38, or 4.8 percent, after hours after it announced its results. They had given up 17 cents in regular trading to close at $28.71.

The company's quarterly research spending rose to $54.1 million, from $26.7 million a year ago. It said the money went toward developing its Model S sedan and preparing the Tesla factory.

Tesla said sales of the Model S should allow it to grow its revenue "very substantially" starting next year.

"These continuing pre-production losses in the short term reflect our strategic decision to ramp up our business to the next level," CEO Elon Musk and CFO Deepak Ahuja said in a written statement.

They said they expect Tesla to start delivering the Model S in the middle of next year.

Tesla ended the quarter with $334 million in cash and $240 million in an undrawn line of credit with the Energy Department. It said that should be enough money to develop and deliver its Model S and Model X vehicles.

Tesla added 1,150 net new reservations during the quarter, for a total of about 6,500 as of the end of September.