SAN FRANCISCO (Reuters) - Tesla said it would produce its new Model 3 sedan at a profit after several recent weeks in which output stabilized, buoying hopes that the electric vehicle maker led by Elon Musk will stanch its financial losses in the second half of the year.

Chief Executive Musk is under intense pressure to prove he can deliver consistent production numbers for the sedan, Tesla’s lowest-priced model and the key to its plans to become a mass-market automaker, after a host of manufacturing challenges and concerns it was running through cash too quickly.

Despite Tesla reporting a record loss that doubled to $718 million in the second quarter, shares jumped as much as 11 percent in after-hours trading, as investors focused on steadier production volumes and a slower rate of cash burn. That put it on track to retake the title of most valuable U.S. automaker from General Motors Co.

The company cut its capital spending plans and said it would not hit its long-term rate of producing 10,000 Model 3s per week until next year, trading off production ramp speed for financial health.

“We like the more muted tone of the company’s outlook, with the absence of unnecessary new stretch goals,” said CFRA analyst Efraim Levy. “Perhaps it reflects a more cautious Elon Musk.”

The outspoken Musk, who told analysts last quarter that he refused to answer their “boring” questions, apologized multiple times on Wednesday during a post-earnings call for his past behavior.

Tesla said that during July it had hit an earlier goal of building about 5,000 Model 3s per week “multiple times”, and reiterated a target of producing 6,000 per week by late August. Analysts have questioned whether the 5,000 rate would be sustainable.

It expects to build a total of up to 55,000 Model 3s in the third quarter, which works out to an average weekly rate of 4,230, at a roughly 15 percent gross margin, rising to 20 percent in the fourth quarter.

Tesla delivered its 200,000th electric car - including its more expensive Model S and X vehicles - in July, a threshold which means a $7,500 federal subsidy will remain in place to the end of the year.

Had it delivered the car in June, the subsidy would have lapsed a quarter earlier, a strategic move applauded by Ross Gerber, chief executive of Gerber Kawasaki Wealth and Investment Management, which holds Tesla shares.

Thus far, Tesla has only produced higher-cost versions of the Model 3, starting at about $49,000. But Musk said many of the trade-ins it received were mass-market vehicles, including the Toyota Prius and Honda Accords and Civics.

Tesla recently opened up reservations for the Model 3, allowing new buyers of the pricier models to jump ahead of those who had ordered base models of the vehicle two years ago. That angered some deposit-holders, and analysts questioned whether more would drop out because of delays making the cheaper $35,000 version.

CASH FLOW POSITIVE

Wall Street analysts have also questioned whether Tesla would need to raise more cash, but Musk said on the call that he expected the company to be henceforth profitable and cash flow positive, excluding some debt repayment, and had no plans for an equity raise.

Tesla plans to pay off its upcoming debt - some $1.8 billion comes due before November 2019 - through internally generated cash flow, Musk said.

Tesla ended the second quarter with $2.78 billion in cash after spending $610 million in capital expenses.

Free cash flow, a key metric of financial health, narrowed to negative $740 million in the second quarter from negative $1 billion in the first quarter, excluding solar business costs.

FILE PHOTO: A man walks near a logo of Tesla outside its China headquarters at China Central Mall in Beijing, China July 11, 2018. REUTERS/Jason Lee/File Photo

Tesla has begun to lay off 9 percent of its workforce as it tightens spending. Tesla said its capital expenses would be slightly below $2.5 billion in 2018, less than last year’s $3.4 billion.

The company also outlined expansion plans, saying it would likely announce the location of a European factory this year and planned a Shanghai, China plant to produce both vehicles and batteries. Tesla’s China investment would not start “in any significant way” until 2019, with much of the roughly $2 billion cost to be funded via local debt.

Excluding items, Tesla reported a loss of $2.45 per share, compared with expectations of a loss of $2.92.

Total revenue rose to $4 billion from $2.79 billion.

The after-hours rise took shares to around $328. The stock has slumped 19 percent since a 2018 high of $370.73 in June.