Tesla on Wednesday reported a wider-than-expected quarterly loss, the largest in its history. In its third-quarter earnings report, the company said it would cut production of its Model S and Model X vehicles to redeploy resources toward the Model 3. In October, CEO Elon Musk described the newest vehicle as being “deep in production hell.” Tesla’s negative free cash flow swelled to $1.4 billion, more than analysts had expected.

Tesla on Wednesday reported the largest quarterly loss in its history and said it was cutting production on two of its vehicle models.

Here are the key third-quarter numbers (expectations via Bloomberg):

    Adjusted loss per share: -$2.92 (-$2.23 expected). Revenue: $2.98 billion ($2.39 billion expected). Free cash flow: –$1.4 billion (-$1.2 billion expected).

The company said it planned to produce “about 10% fewer” units of its Model S and Model X models in the fourth quarter and reallocate resources to the Model 3, its newest. Tesla expects to hit a Model 3 production rate of 5,000 vehicles a week by late in the first quarter of 2018.

“While we continue to make significant progress each week in fixing Model 3 bottlenecks, the nature of manufacturing challenges during a ramp such as this makes it difficult to predict exactly how long it will take for all bottlenecks to be cleared or when new ones will appear,” Tesla said in its statement.

Tesla said in October that it produced only 260 vehicles, well below its target of 1,500. CEO Elon Musk said the Model 3 was "deep in production hell."

Tesla's negative free cash flow expanded to -$1.4 billion, more than analysts' forecast of -$1.2 billion.

The company said it was working with organizations in Puerto Rico to provide solar panels following the devastation left by Hurricane Maria in late September. Installations of its energy-storage units rose 138% year over year in the third quarter, driven by the Powerwall, its at-home battery.

Tesla shares fell as much as 5% in extended trading after the earnings release. Tesla has surged 51% this year through Wednesday's close, and its market cap at various points has surpassed those of rivals including Ford, Fiat Chrysler, and General Motors.