SHANGHAI (Reuters) - Tesla Inc TSLA.O Chief Executive Officer Elon Musk on Tuesday landed a deal with Chinese authorities to build a new auto plant in Shanghai, its first factory outside the United States, that would double the size of the electric car maker's global manufacturing.

The deal was announced as Tesla raised prices on U.S.-made vehicles it sells in China to offset the cost of new tariffs imposed by the Chinese government in retaliation for U.S. President Donald Trump’s heavier duties on Chinese goods.

Musk was in Shanghai Tuesday, and the Shanghai government in a statement said it welcomed Tesla’s move to invest not only in a new factory in the city, a center of the Chinese auto industry, but in research and development, as well. China has long pushed to capture more of the talent and capital invested by global automakers in advanced electric vehicle technology.

Tesla plans to produce the first cars about two years after construction begins on its Shanghai factory, ramping up to as many as 500,000 vehicles a year about two to three years later, the company said.

That would make Tesla’s Shanghai plant large by auto industry standards, where most factories are tooled to build 200,000 to 300,000 vehicles a year, and roughly equivalent to the planned annual production at Tesla’s plant in Fremont, California.

Tesla shares rose 1.5 percent in U.S. trading even as some analysts questioned where the money-losing company will get the capital required to build and staff such a large plant.

Musk has said Tesla will be cash-flow positive this year. Analysts have predicted it will raise capital to fund a list of new projects, including launching an electric semi truck, a pickup truck, a compact SUV and new battery and vehicle production facilities that Musk has proposed for China and Europe.

“I am sure that Tesla needs fresh money at the latest next year,” said Frank Schwope, an analyst with NORD/LB.

The Shanghai government suggested it could help with some of the capital costs. “The Shanghai municipal government will fully support the construction of the Tesla factory,” its statement said.

Slideshow ( 3 images )

Tesla said Tuesday’s announcement will not impact U.S. manufacturing operations, which continue to grow.

MUSK’S PURSUIT OF A CHINA PLANT

China is the largest market for electric vehicles, and most forecasters predict that electric vehicle sales in the country will accelerate rapidly as government regulation drives toward a goal of 100-percent electric vehicles by 2030.

More than 28 million vehicles were sold in China last year, and annual sales are forecast to top 35 million by 2025. That would be more than double the current U.S. market, where new light vehicle sales run at about 17 million vehicles a year.

Musk was talking about building a Chinese factory long before the Trump administration proposed punitive tariffs on Chinese goods. China until recently levied 25-percent tariffs on imported cars, and for decades automakers have been moving to build more vehicles in the markets where they are sold to neutralize currency shifts and trade policy reversals.

Chinese authorities' decision to grant Tesla permission to move forward lands as President Trump is fighting to stop U.S. manufacturers from responding to his trade policy by shifting production overseas, as U.S. motorcycle maker Harley-Davidson Inc HOG.N said it would do last month.

Against the backdrop of trade conflict with Washington, China is using its power to draw investment from the global auto industry. German automakers on Monday and Tuesday dominated a list of deals between China and Germany focused on the development of electric vehicles and technology for connectivity and self-driving cars.

BMW BMWG.DE agreed with partner Brilliance Automotive Group Holdings 1114.HK to up production capacity at joint venture BMW Brilliance Automotive to 520,000 BMW brand vehicles in 2019.

Slideshow ( 3 images )

Capacity at BMW Brilliance Automotive’s (BBA) two production sites will outstrip BMW’s U.S. plant in Spartanburg, South Carolina, for the first time. BMW said last week it would be unable to fully absorb a new Chinese 25-percent tariff on imported U.S.-made models and would have to raise prices on the vehicles it makes in Spartanburg.

Volkswagen VOWG_p.DE, meanwhile, said it will cooperate with China's FAW Group 000800.SZ on technologies including e-mobility, connectivity and autonomous cars.

Tesla has been in protracted negotiations to open its own factory in China to help bolster its position in the country’s fast-growing market for electric cars and to avoid high import tariffs.

Tesla hiked prices in China over the weekend to a level more than 70 percent higher than in the United States amid mounting trade frictions between Washington and Beijing that have seen several U.S. imports, including cars, subjected to retaliatory tariffs of 25 percent.

Musk had previously criticized China’s tough auto rules for foreign businesses, which would have required it to cede a 50-percent share in the factory. After China announced in May that it planned to scrap by 2022 the rules on capping foreign ownership of new-energy vehicle ventures, Tesla registered a new electric car firm in Shanghai.

“The Shanghai plant will certainly improve Tesla’s positioning in China and allow it to locally produce and avoid import tariffs. The relaxation of the 50/50 rule for JVs in China uniquely benefits Tesla because they did not have an existing JV in China” as rivals do, said Tasha Keeney, an analyst with ARK Invest.