Tesla is slashing prices in China for the second time this year, taking a bigger hit from the country’s trade war with the United States in a bid to protect sales. The electric carmaker announced Thursday that it will slash prices of its Model S sedan and Model X SUV by between 12% and 26%, even though higher Chinese tariffs on US autos have made it more expensive to import cars. “We are absorbing a significant part of the tariff to help make our cars more affordable for customers in China,” a Tesla (TSLA) spokesperson said in a statement. The basic version of the Model S now costs 782,900 yuan ($113,000) — down from 849,900 yuan ($122,525) — while the most expensive version of the Model X has gone from 1.57 million yuan ($227,000) to around 1.2 million yuan ($171,000). Its cheapest car, the Tesla Model 3, will be launched in China with a starting price of 540,000 yuan ($78,000). Tesla’s prices in China have fluctuated wildly this year. It slashed them in May after Beijing announced it would cut tariffs on car imports from 25% to 15%. But the company raised its prices in July after Beijing imposed a new 25% tariff on US cars, retaliating for America’s decision to target Chinese goods with its own tariffs. Now, Tesla says it will bear most of the cost of tariffs in an effort to woo customers in the world’s biggest market for electric vehicles. China accounts for about half of global sales of electric vehicles, and other big companies like Volkswagen (VLKAF) are investing billions to increase their footprint in the country. Tesla’s revenue from China doubled last year to more than $2 billion, accounting for nearly 20% of the company’s total. And Tesla will be hoping that one day it will be able to sell cars in China without paying import taxes. The company is building a factory in Shanghai that it says will eventually churn out 500,000 vehicles a year, about five times the number it currently produces in the United States.