Tesla's second-quarter revenue grew by more than $1 billion as the electric car maker delivered more Model 3 vehicles, but its net loss still rose dramatically as it ramped up production.

The electric vehicle company founded by billionaire Elon Musk reported an adjusted net loss of $717 million for the period on revenue of $4 billion. Tesla went through $739.6 million in cash between April and June, less than the $900 million Wall Street analysts had forecast.

In another boost, the automaker said it has trimmed its capital spending by manufacturing the Model 3 on existing assembly lines, rather than building new lines.

Get Breaking News Delivered to Your Inbox

Shares rose more than 5 percent in after-market trading.

Although Tesla is burning through less cash, it continues to lose money. The compay reported an adjusted net loss of $3.06 per share, more than analysts expected. The loss more than doubled from the same quarter a year ago.

In a statement, Tesla said it had achieved its target of producing 5,000 Model 3 vehicles per week and that it aims to make 6,000 per week by the end of August. The company said it expects to produce 50,000 to 55,000 Model 3 vehicles in the third quarter -- that would represent a sharp increase from the previous quarter.

"It took 15 years to execute on our initial goal to produce an affordable, long-range electric vehicle that can also be highly profitable," Musk and Chief Financial Officer Deepak Ahuja wrote in a letter to shareholders. "In the second half of 2018, we expect, for the first time in our history, to become both sustainably profitable and cash-flow positive."

In its eight years as a public company Tesla has turned a profit in only two quarters.

The Model 3 is Tesla's most affordable vehicle with a base price of $35,000, and analysts consider it key to the company's goal of cracking the mainstream auto market.

Spotlight on Musk

Investors have been eager to see Tesla's latest financial results, with the automaker under growing pressure to meet production and profitability targets. CEO Musk is under particular scrutiny after his comments during a May earnings call in which he rebuked analysts for asking "boring, bonehead" questions.

Speaking with analysts to discus Tesla's latest results, Musk on Wednesday expressed regret for his behavior in the previous earnings call, saying, "I'd like to apologize for being impolite on the prior call. ... I think there's no excuse for bad manners."

Musk attributed his intemperate remarks this spring to the long work weeks at Tesla and a lack of sleep, while adding that "there's still no excuse for it."

Despite a rocky first half -- including missed manufacturing targets, a downgrade of its debt and a recent report showing the company took the unusual step of asking suppliers to refund money on payments already made -- Tesla's stock has been resilient. Before today's earnings report, the shares were down less than 5 percent on the year.

"Now that we have reached a production rate of 5,000 Model 3 vehicles per week, we are focused on further ramping production, and achieving profitability and continuous cost efficiencies," Musk and Ahuja said.

On the call, Musk said that the planned Shanghai factory would help Tesla get close to the goal of one million vehicles worldwide by 2020, and that the company is looking to announce a factory in Europe by the end of the year.

-- The Associated Press contributed reporting