DETROIT (AP) -- Electric car maker Tesla Motors posted its first quarterly profit in three years on Wednesday, giving investors reason to cheer after months of doubt.
Tesla's shares have fallen since the summer as some investors questioned the company's proposed merger with solar panel maker SolarCity Corp. Goldman Sachs recently downgraded Tesla's shares from "buy" to "neutral" and lowered its price target, saying the potential merger could delay the release of Tesla's much-anticipated Model 3.
But Tesla CEO Elon Musk said in a letter to investors that the third quarter showed Tesla could meet its goals while keeping one eye on opportunities for future growth.
Musk also reiterated that Tesla shouldn't need to raise cash to support the Model 3, and doesn't expect a capital raise through the first quarter of next year. There had been some questions about the company's ability to proceed without raising more money, but Tesla ended the quarter with positive free cash flow of $176 million.
"Things are looking good," Musk said in a conference call with analysts and media. "It's not to say there could be some darkness ahead... (but) it's overall looking quite promising."
Tesla reported net income of $21.9 million, or 14 cents per share, up from a loss of $229.9 million in last year's July-September period.
Revenue more than doubled to $2.3 billion. That included $149.7 million in non-automotive revenue -- up 78 percent from last year -- in part because of growth in Tesla's energy-storage business.
Tesla, which went public in 2010, has had only one other profitable quarter: the first quarter of 2013. But the company said it expects to report net income in the fourth quarter of this year.
The results surprised Wall Street, which forecast a loss of 86 cents, according to analysts polled by FactSet. Analysts had expected revenue of $2.2 billion.
Tesla's shares rose 4.5 percent to $211.33 in after-hours trading.
Tesla delivered 24,821 vehicles during the quarter, an increase of 72 percent over the same period last year. The Palo Alto, California-based company said Wednesday it still expects to deliver just under 80,000 vehicles worldwide this year, up from 50,500 in 2015.
Tesla said it also remains on track to start deliveries of its $35,000 Model 3 electric car in the second half of 2017. Musk wouldn't give an update on the number of reservation holders the company has for the Model 3. In May, the company said 373,000 people had put down $1,000 deposits for the car.
Tesla could still face some challenges in the near future. The company raked in $138.5 million in the third quarter by selling zero-emission vehicle credits to other automakers, but it said revenue from such credits will be "negligible" in the fourth quarter.
There are also questions about the integration of SolarCity, which lost $55.5 million in the second quarter.
Musk, who is also SolarCity's chairman, proposed in June that Tesla buy SolarCity in an all-stock offer now worth around $2.45 billion. Shareholders of both companies will vote on the proposal on Nov. 17.
Musk said he thinks SolarCity would be neutral or "perhaps a cash contributor" in the fourth quarter if the merger were approved.