MEXICO CITY (Reuters) - A second U-turn this year by Ford Motor Co F.N in Mexico has raised the specter of Chinese competition for local carmaking, adding to pressure on the industry after repeated threats by U.S. President Donald Trump to saddle it with punitive tariffs.

FILE PHOTO: The logo of Ford is pictured at the 38th Bangkok International Motor Show in Bangkok, Thailand March 28, 2017. REUTERS/Athit Perawongmetha/File Photo - RTS18CA7

Ford announced on Tuesday it would move some production of its Focus small car to China instead of Mexico, a step that follows the U.S. automaker’s January cancellation of a planned $1.8 billion plant in the central state of San Luis Potosi.

The scrapping of the Ford plant was a bitter blow, coming after U.S. President Donald Trump had blamed the country for hollowing out U.S manufacturing on the campaign trail, and threatened to impose hefty tariffs on cars made in Mexico.

Since then, rhetoric from the Trump administration has become more conciliatory, and Mexico and the United States have expressed confidence that the renegotiation of the NAFTA trade deal, expected to begin in August, could benefit both nations.

But the loss of the Focus business is an unwelcome reminder of competition Mexico faces from Asia at a time China’s auto exports and the quality of its cars are rising.

“For a long time, the quality of vehicles coming out of China was not to global standards. There was a gap in quality that (favored) Mexico - but that is closing,” said Philippe Houchois, an analyst covering the auto industry at investment bank Jefferies. “That is probably a threat to Mexico.”

In the past decade, global automakers have invested heavily in Chinese factories to make them capable of building cars at quality levels that make the grade in developed markets.

Ford’s decision to shift Focus production for the United States market to China from Mexico shows automakers have increasing flexibility to choose between the two countries to supply niche vehicles to American consumers or other markets.

‘VERY TROUBLING’

Demand for small cars in the United States is waning and General Motors Co GM.N faces a similar situation to Ford's with its Chevrolet Cruze compact.

Were GM to go down the same path with the Cruze and shift its production out of U.S. factories, it could give more work to its Mexican plants - but might also bring its Chinese operations in Shenyang or Yantai into play.

“The Cruze is a global product that is built in multiple GM plants around the world, including the U.S.,” said GM spokesman Pat Morrissey. “Our general philosophy is that we like to build where we sell.”

Studies show Mexican manufacturing is competitive, and business leaders believe that NAFTA talks between Mexico, the United States and Canada could ultimately yield tougher regional content rules for the region that benefit local investment.

Ford said its decision balanced cheaper Chinese labor rates against pricier shipping, but that in the end an already-planned refit of its Chinese factory saved it some $500 million over retooling both that facility and its Hermosillo plant in Mexico.

The volatile state of U.S.-Mexican trade relations also carries big risks if Trump renews his threats to impose 35-percent tariffs on cars made in Mexico.

To be sure, Trump has also threatened to levy 45-percent tariffs on Chinese goods and his Trade Representative Robert Lighthizer said he found Ford’s China move “very troubling.”

Trump’s threats have battered the peso, ironically making Mexico’s goods cheaper. Uncertainty over the future of NAFTA pushed the currency to a record low in January, although it has since rebounded.

That same month, the Boston Consulting Group published an assessment of manufacturing competitiveness that gave Mexico an 11-percent lead over China.

That advantage has prompted global firms to plow billions of dollars into the Mexican auto industry, pushing output to record highs. Some officials in the automotive sector painted Ford’s move as a one-off decision.

“There’s still very dynamic investment and growth in plants,” said Alfredo Arzola, director of the automotive cluster in Guanajuato state, one of Mexico’s top carmaking hubs.

Still, there have been “significant quality improvements” in Chinese cars, consultancy J.D. Power said in a 2016 study.

Chinese car manufacturing could catch up with international standards in China by 2018 or 2019, said Jacob George, general manager of J.D. Power’s Asia Pacific Operations, citing the consultancy’s gauge of “hard quality”, or failures.

However, when measured in terms of “perceptual” quality, China was probably still some 4 to 6 years behind, he added.