Tesla has signed an agreement with authorities in Shanghai, China to build a production factory in the city with an annual capacity of 500,000 vehicles.

The facility, officially dubbed Gigafactory 3, will be located in Lingang, near Shanghai’s free-trade zone.

This will be the first wholly foreign owned plant of its kind in China and could be the largest overseas investment in Shanghai’s manufacturing sector, potentially surpassing the $5.5 billion Walt Disney invested in the Shanghai Disney Resort.

The Memorandum of Understanding signed by Tesla confirms that the Gigafactory 3 will incorporate research and development, manufacturing and sales functions, South China Morning Post reports.

Chinese financial magazine Caijing reports that construction on the factory will start early next year.

Fresh off his visit to the caves in Thailand where a group of young boys were stuck, Elon Musk, who managed to get mini-subs to be built in no time, although they weren’t used for the rescue after all, flew to China to attend the signing.

In the past, Musk has criticized China’s auto rules that require foreign car manufacturers to form a 50-50 joint venture with a local company before building vehicles in the country. Shortly afterwards, China announced plans to scrap these rules for new-energy vehicle ventures by 2022 and Tesla registered a new electric car company in Shanghai to get the wheels in motion.

The announcement of this factory comes just a couple days after Tesla increased its prices in China by 20 per cent due to tariffs implemented by the local government in retaliation for additional tariffs placed on its products by the United States.

The prices of Tesla vehicles in the Chinese market will, thus, fall significantly when the Shanghai plant becomes operational.