PALO ALTO, Calif. (AP) — Electric car maker Tesla Motors Inc. said Tuesday that its third-quarter loss widened to $34.9 million as it sold fewer cars than a year earlier and it spent significantly more on research and development for its upcoming Model S sedan.

Tesla lost $34.9 million in the third quarter, compared to a loss of $4.6 million a year earlier.

The company's loss per share fell to 38 cents from 66 cents because of higher share counts. Tesla conducted an initial public offering June 29.

Tesla said its quarterly revenue fell 31 percent to $31.2 million as sales of its $101,500 Tesla Roadster electric sports car fell by nearly half to 19,457 vehicles.

Still, the results Tesla beat Wall Street analysts' expectations on average for a loss of 43 cents per share on revenue of $28 million, according to Thomson Reuters.

Tesla said it spent $26.7 million on research and development during the quarter, compared with $1.3 million a year earlier.

The launch of Tesla's lower-priced Model S sedan remains on track for mid-2012, the company said. It plans to make the Model S at the former New United Motor Manufacturing Inc. plant in Fremont, Calif., which it has purchased.

The plant was built and operated as a joint venture between General Motors Co. and Toyota Motor Corp.

Tesla shares fell 35 cents to close at $24.63.