Tesla has hiked the prices of its cars in China by about 20% after getting caught in the crossfire of the trade clash between Washington and Beijing.

The move by the electric car maker follows China's decision to slap new tariffs on American vehicles in retaliation for US measures against $34 billion of Chinese exports.

It's the latest major company to feel the impact of the trade war between the world's top two economies.

Tesla's (TSLA) China website now lists the cheapest price for a Model S sedan at 849,900 yuan ($128,500), up from 710,600 yuan ($107,400) previously.

At the top of the range, the most expensive Model X crossover is now 1.57 million yuan ($240,000) up from about 1.32 million ($200,000) before.

Tesla didn't respond to a request for comment on the price rises.

The company had only just cut its prices in China in May after Beijing announced it was slashing tariffs on car imports from 25% to 15%.

That change took effect July 1, but Tesla and other automakers that export from the United States to China only benefited from the reduction for a few days.

Global automaker Daimler (DDAIF) warned last month that the new Chinese tariffs would hit its profits, resulting in "fewer than expected SUV sales and higher than expected costs," which won't be completely passed on to customers.

Related: Daimler warns US-China trade war will hit its profits

China is a huge market for Tesla. Revenues in the country doubled last year to more than $2 billion, accounting for almost 20% of the company's total.

Increasing prices could threaten its position in such an important market. "This will certainly not be good for consumers or for Tesla's sales in China," said Bill Russo, founder of Shanghai-based consultancy Automobility.

He added that Tesla could lose market share to Chinese competitors, such as NIO, as a result. Russo said NIO's new ES8 SUV has been positioned as a "Tesla-fighter."

Tesla is the first major US automaker to raise prices in China in response to the higher tariffs. Most big American car companies avoid hefty import tariffs by making many of their vehicles for the Chinese market inside the country through joint ventures with local partners.

BMW exported about 81,000 cars from a plant in South Carolina to China last year, generating about $2.4 billion in sales. The South Carolina BMW plant, the company's largest in the world, is also the largest source of US auto exports. BMW said Tuesday that it will have to raise the price of cars shipped from the plant to China because of the tariffs, though it has yet to determine by how much.

"BMW China will not be able to completely absorb the duty increase for US imported models. We are currently calculating related necessary pricing increases," the company said in a statement.

BMW also announced plans to increase production in China, but it said that was because of increased demand for vehicles there. It said it would not be cutting South Carolina production or jobs because of Chinese expansion plans.

Tesla makes most of its cars in California, although it does some final assembly of cars in a much smaller plant in the Netherlands.

Related: Tesla is going big in China

On Tuesday, Tesla CEO Elon Musk was in Shanghai to announce plans for the company's first factory in China. It is expected to build about 500,000 cars a year, enough to rival Tesla's main factory in California.

The plant is not expected to reach full capacity for four to five years. If there are still tariffs in place when it starts building cars, those cars would not be subject to tariffs.

In a first for a foreign automaker, Tesla was allowed to open the factory without partnering with a Chinese company. Tesla was reluctant to enter into a joint venture with a Chinese partner because it didn't want to share its intellectual property.

-- Serenitie Wang and Chris Isidore contributed to this report.