Tesla Motors
Tesla Model S electric car is seen at its dealership in Seoul, South Korea July 6, 2017.Reuters/Kim Hong-Ji

US carmaker Tesla Inc has hiked prices on its Model X and S cars by about 20 percent in China, becoming the first automaker to raise prices in the world's largest automotive market in response to a U.S.-China trade war.

The move is the first indication of how much higher Chinese tariffs on certain U.S. imports will flow through to showroom floors, with other automakers likely to follow suit or shift a greater portion of production to China.

China slapped retaliatory tariffs on U.S. car imports in response to U.S. President Donald Trump's move to impose tariffs on $34 billion worth of Chinese goods. The Chinese tariffs are expected to hurt automakers as well as companies that make industrial components in the United States and produce soybean, whisky and other agricultural produce.

For Tesla especially, rapidly burning cash and struggling to turn a profit, China is key. Sales in the country accounted for about 17 percent of its revenue last year."

In May it slashed up to $14,000 off its Model X in China after Beijing announced major tariff cuts for imported automobiles, but the new tariffs have now erased that. A basic Model S sedan now costs about 849,900 yuan ($128,779) up from 710,579 in May, while a Model X sport-utility vehicle costs about 927,200 yuan now, versus 775,579 yuan in May, according to its website.

Tesla Motors, tesla motors India, Elon Musk
Tesla Motors Inc Chief Executive Elon Musk poses with a Tesla Model S electric car in Tokyo September 8, 2014.Reuters

Tesla's price increases come as it plans to build a factory in Shanghai to serve the Chinese market. The company ships more than 15,000 cars a year to China. Chief Executive Elon Musk is expected to visit Shanghai on Tuesday, Bloomberg reported, citing people familiar with the plans. Musk will also visit Beijing on Wednesday and Thursday, Bloomberg said, quoting one of the sources.

"Tesla consumers are a unique group of rich people. They want more of a brand image and product experience, the price is less of a concern for them," said Yale Zhang, head of Shanghai-based consultancy Automotive Foresight, who believes rich Chinese consumers will keep buying Teslas despite the price hikes.

German luxury automaker BMW, which also makes cars in the United States to sell in China, has also flagged that it will raise prices on vehicles it makes in Spartanburg, South Carolina. It said on Friday that it was unable to "completely absorb" the new tariffs.

Daimler AG, another German automaker which imports U.S.-produced cars into China, said in a statement over the weekend that it "aims to maintain a competitive position" in China. Ford Motor Co said on Thursday it would not hike prices on its imported cars, for now, crimping its profit margins.