(Bloomberg) -- Tesla Inc. won permission to start mass production at its China factory, clearing one of the last hurdles to begin selling locally built cars in the world’s largest electric-vehicle market.

The clearance was disclosed by China’s Ministry of Industry and Information Technology on its website Wednesday. Tesla unveiled its first vehicles assembled at the Shanghai facility earlier this month, made as part of trial operations.

China’s first plant wholly owned by a foreign carmaker — and Tesla’s first outside the U.S. — is a crucial test of Chief Executive Officer Elon Musk’s bid to prove his carmaker can sustain profitability as he bets on Chinese EV demand.

The Shanghai Gigafactory, which broke ground in January, will initially build Model 3 sedans which start at about $50,000. It will compete with electric cars from local contenders such as NIO Inc. and Xpeng Motors, as well as global manufacturers including BMW AG and Daimler AG.

The Shanghai roll-out will also provide clues about Tesla’s ability to truly go global. Musk announced Tuesday that the company will round out its global manufacturing network with a factory in Berlin.

To contact Bloomberg News staff for this story: Chunying Zhang in Shanghai at czhang714@bloomberg.net

To contact the editors responsible for this story: Young-Sam Cho at ycho2@bloomberg.net, Ville Heiskanen

©2019 Bloomberg L.P.