Tesla Inc. (TSLA  ) is planning to build a factory in China with a capacity for 500,000 vehicles a year, its biggest step beyond the US thus far. To compare, the Tesla factory in Fremont, California, their only operational facility, produced about 1,000 cars a day late last month. The company has an annual target of 500,000 vehicles.

Tesla is due to sign a memorandum of understanding with local stakeholders in Shanghai soon. According to various sources, Chief Executive Officer Elon Musk would be in the city for an event with the government on Tuesday.

The company has been planning a Chinese factory for over a year, but the recent buzz surrounding the plans still caused Tesla stock to rise 2.7% in premarket trading. Tesla has been negotiating for the factory to be wholly-owned, which would be a first for a foreign car manufacturer in China. Most foreign firms manufacture in China through joint-venture operations, such as BMW's (ETR: BMW) recently-announced plan to produce Minis in China.

Teslas cost more in China than in the States due to tariffs that just climbed to 40% and additional shipping costs. Tesla has also increased the prices for Model S and Model X by between 150,000 yuan and 250,000 yuan because of the new tariffs. For Tesla, a company that is plowing through cash and struggling to turn a profit, China is a key market. Sales in the country accounted for about 17% of its revenue last year.

These prices are more than 70% higher than in America, where the basic Model S sedan sells for $74,500.

"Raising the prices is going to hurt sales, but money-losing Tesla has to raise prices because they can't afford to fully absorb the higher costs of the tariffs," CFRA research analyst Efraim Levy said. "Considering they claim to be capacity-constrained, they should be able to shift sales elsewhere."

In November, Musk said Tesla is about three years away from starting production in the world's largest auto market. The plant will make a couple hundred thousand vehicles a year for buyers in China and potentially other parts of Asia, he said at the time. Tesla probably will make the smaller Model 3 sedan and upcoming Model Y crossover in China, he said then, rather than the pricier Model S sedan or Model X sport utility vehicles, which often sell for more than $100,000 in the U.S.

China presents a huge growth opportunity for Tesla and rivals such as BMW AG and Daimler AG (ETR: DAI) that are hoping to take advantage of the fast-growing market. Sales of new-energy vehicles, which include battery-powered, plug-in hybrid and fuel-cell automobiles, reached 777,000 units last year and could surpass 1 million this year, according to estimates by the China Association of Automobile Manufacturers. The government's target is 7 million vehicles a year by 2025.

Tesla sold 14,779 vehicles in China last year, according to data from LMC Automotive. That gave it about 3% of the nation's battery-powered electric-vehicle market, rendering it the tenth largest brand in that segment.