Tesla released critical production numbers for its Model 3 early Monday, showing that in the last week of June, it produced 5,031 Model 3s.

CEO Elon Musk has said repeatedly that reaching production of 5,000 Tesla Model 3s a week is critical to the company's financial survival, and that he expected the company to reach that goal by the end of June.

The company built a new assembly line for the Model 3 in a tent extending from its Fremont, California, factory in three weeks at the end of May and beginning of June, and produced the first Model 3 Performance All-Wheel Drive on the line June 16, according to a Tweet by Musk.

DON'T MISS: Tesla Model 3 orders open to all US, Canada buyers

In its statement, the company said the new line was responsible for 20 percent of Model 3 production last week, or about 1,000 cars.

The statement said that the regular Model 3 assembly line alone should be able to reach 5,000 cars a week "soon," but that the new GA4 assembly line will eventually help the company exceed that rate.

Musk set a new goal of building 6,000 Model 3s a week, perhaps by the end of August.

Canadian reader K's new Tesla Model 3

Canadian reader K's new Tesla Model 3

Reaching the 5,000-unit target represents a doubling of weekly production since Tesla's first quarter production rate for the Model 3.

In total, the company produced 28,578 Model 3s in the second quarter, for an average rate through the quarter of just under 2,400 cars per week.

For the first time, Model 3 production exceeded that of the Tesla Model S and Model X combined. Those models accounted for 24,761 cars through the quarter.

Tesla has begun producing more expensive versions of the Model 3, including the Performance model, which can top out at $80,000, a little more than the price of an entry-level Model S.

READ THIS: First Tesla Model 3 Performance AWD built; Musk claims company was "sabotaged"

Musk has said production of the long-awaited base Model 3, which is supposed to cost $35,000 won't start for another three to four months.

"The last 12 months were some of the most difficult in Tesla’s history, and we are incredibly proud of the whole Tesla team for achieving the 5,000 unit Model 3 production rate. It was not easy, but it was definitely worth it," the automaker said in a statement.

The company reports it still holds 420,000 Model 3 reservations.

Tesla does not report sales, but instead reports how many cars it has delivered. It says it delivered 18,440 Model 3s for the quarter, and 40,740 cars overall. About another 15,000 cars were in transit to customers, the company said.