The trade war between China and the United States is well underway, and one of the consequences of that dispute is that the Middle Kingdom has raised tariffs on vehicles built in the US. In the midst of the fallout, BMW is moving some production of the Chinese-market X5 to Thailand, according to a report by Reuters.

Like almost all of BMW’s SUVs, the X5 is currently built at its North American plant in Spartanburg, South Carolina, meaning that it would be hit by the new 40% tariff on imported vehicles from the United States. The company started building the previous-generation X5 in Rayong, southeast of Bangkok, in 2016, and the plant is now capable of making a “significant portion” of vehicles destined for the Chinese market.

This was revealed during a conference call with analysts to discuss BMW’s results for the second quarter of the year, in which CEO Harald Krueger said, “This is one action to counteract [the tariffs].” The company is said to be producing between 10,000 and 20,000 X5s in Thailand as part of the measure.

It’s a indication of just how important a market China is for BMW, and to that end the company has also ramped up investment in the country. It has agreed with Chinese carmaker Brilliance to expand their joint venture, which will build the all-electric iX3 for export markets from 2022. It has also signed an agreement with Great Wall Motor to produce electric-powered MINI models in China.