SAN FRANCISCO (Reuters) - Tesla Motors Inc TSLA.O reported its first quarterly net profit in more than three years on Wednesday, buoyed by nearly $139 million in sales of clean car credits, and Chief Executive Elon Musk said the company could turn a profit again in the fourth quarter.

The electric carmaker also signaled it has substantially reduced the costs for launching production of its high volume Model 3 sedan next year. Musk told analysts the company’s current plan “does not require any capital raise for the Model 3 at all.”

The tech billionaire said Tesla could still raise capital to “account for uncertainty ... and de-risk the business,” however.

The third quarter profit and a leaner capital spending plan could help grease the wheels for Musk if he does seek to tap the markets for cash. Turning a profit, even for one quarter, should help counter skeptics who have questioned his ambitious plans for combining Tesla and solar panel maker SolarCity SCTY.O into a company offering roof-to-garage no-carbon energy systems.

Musk has made promises to investors before related to the timing of product launches, production and profitability, only to walk them back.

The company has weathered a difficult few months, beginning with the death of a Model S driver using Autopilot, Tesla’s much vaunted semi-autonomous driving system, and culminating in the decision to acquire debt-laden SolarCity, which has increased scrutiny on the finances of both Tesla and SolarCity.

Earlier this month, Tesla told investors it expected to raise capital this year to fund the Model 3 launch, which will involve a substantial investment in machinery and product development. But Musk signaled in a tweet earlier this month that was no longer the case.

Tesla Motors CEO Elon Musk introduces the falcon wing door on the Model X electric sports-utility vehicles during a presentation in Fremont, California, U.S. September 29, 2015. REUTERS/Stephen Lam/File Photo

Tesla reiterated that the mass-market Model 3 sedan was on track for deliveries in the second half of 2017. The Model 3 has a starting price of $35,000, about half the price of the current Model S sedan.

In the short term, Musk said sales of a new 100 kilowatt-hour version of the Model S, which starts at $134,500 and can travel 315 miles (507 km) on a charge, will be key to profitability.

Tesla said it planned capital spending of $1.8 billion for the year, with just over $1 billion of those outlays coming in the fourth quarter. However, that new total capital spending forecast for this year is about 20 percent lower than the automaker’s previous forecast of $2.25 billion.

Tesla’s results were lifted by $139 million in sales of California zero emission vehicle credits. Rival automakers can buy the credits rather than sell electric cars of their own. That was comparable to what the company booked from sales of so-called ZEV credits for all of 2014, said Cowen analyst Jeffrey Osborne.

“Certainly what drove the upside on profit is the $139 million of those zero emission credits which is a near 100 percent profit business,” said Osborne.

Tesla said it had $3.08 billion in cash and cash-equivalents as of Sept. 30, compared with $3.25 billion at the end of the second quarter.

Tesla’s planned acquisition of SolarCity will be neutral, or a cash contributor to fourth-quarter Tesla results in “a small way,” Musk said.

The automaker’s shares initially rose 6.2 percent in after-hours trade but gave back some of those gains and were trading at about $211 a share, up 4 percent from the closing price of $202.24.

Tesla recorded net income of $21.9 million, or 14 cents per share, for the third quarter ended Sept. 30, marking the first positive earnings since the first quarter of 2013. That compared with a loss of $229.9 million, or $1.78 per share, a year earlier. Total revenue more than doubled to $2.30 billion.

SolarCity shares rose 3 percent in after-hours trade after closing at $19.99.