Tesla almost achieved its goal of producing 5000 Model 3 sedans in a week to end the second quarter.

Two workers revealed to Reuters that the final car passed quality checks at the firm’s California factory at 5 am, not long after Musk’s midnight goal.

In an email sent to employees, Musk said that the company had reached its production target for the Model 3 and is aiming to produce 6000 Model 3s a week in July. At the same time Tesla reached new heights with Model 3 production, it also built 7000 Model S and Model X vehicles in a week.

Surprisingly, this is a promise Tesla has (almost) delivered on.

The electric automaker made a promise it could build 5000 Model 3s a week before the end of the second quarter. While that figure has been achieved (minus a few hours), it remains to be seen if Tesla can keep up this pace due to battery issues and an over-reliance on automation that has plagued Model 3 production since July 2017.

Since March, Tesla has engaged in “burst builds” where it aims to construct as many vehicles as possible in a short space of time. This is done to estimate how many vehicles it can build over longer periods of time. These rates are not sustainable, says Barclays analyst Brian Johnson.

In a bid to achieve its target, Tesla constructed a new assembly line under a massive tent at its Fremont factory in just two weeks. This facility has been churning out dual motor and performance variants of the Model 3.