Tesla has announced it produced 5,031 Model 3 sedans in the final week of June.

The American electric automaker has been fighting an uphill battle while getting through what CEO Elon Musk calls "production hell" for the Model 3. After numerous delays however, the company can finally say 5,000 Model 3s managed to roll off the assembly line in a week, along with 1,913 Model S and Model X vehicles.

For the second calendar quarter Tesla produced a total of 53,339 units, with Model 3 production at 28,578, exceeding Model S and Model X production (24,761 units) for the first time.

The new GA4 assembly line, which is essentially a tent, was responsible for roughly 20-percent of production last week, "with quality from that line being as good as our regular GA3 line," the company said in a press release. It now expects to increase production to 6,000 Model 3 units per week by late August.

SEE ALSO: You Can Thank GM for This Hilarious Looking Baojun EV
Total deliveries for the second quarter stood at 40,740 vehicles with 18,440 Model 3s, 10,930 Model S sedans, and 11,370 Model X SUVs. Tesla added that 11,166 Model 3 vehicles and 3,892 Model X and Model X vehicles were in transit to customers at the end of the second quarter and will be delivered in early third quarter.

Still, it has a lot of work to do considering Model 3 reservations at the end of the second quarter still stood at roughly 420,000. In total, Tesla has delivered 28,386 Model 3 vehicles to date.

A version of this story originally appeared on AutoGuide.com .