Over three million cars have been produced by the company so far, with one-third of them coming from the company's factory in China.

The one millionth car was made by Musk's company, which came despite months of restrictions in China. The factory opened in 2019.

—Elon Musk (@elonmusk) August 14, 2022

While producing over 3 million cars is a milestone forTesla, the electric-vehicle maker still lags far behindlegacy car companies Over 10 million cars were delivered by Toyota, the world's largest car maker, while almost 9 million cars were delivered by Volkswagen, the world's second-biggest car maker.

Musk said on Sunday that production is a bigger challenge than demand for the company.

Musk said on the second quarter earnings call that the company has been in "supply chain hell" for the past few years but could have a "record-breaking" second half of the year.

In July, the company announced that it had delivered more than a quarter of a million cars. Despite supply chain issues and a shortage of parts, the delivery number increased from a year ago. In addition to California, Texas, and Berlin, the company also makes cars there.

On Friday, the company's share price increased by 4.7%. This year the stock is down 25%.