President Donald Trump's move to slap tariffs on goods imported from Mexico into the United States hammered the stocks of automakers Friday as investors counted the cost of price increases on one of the world's biggest car-production markets.

Trump's announcement on Mexican tariffs, first announced through his Twitter account late Thursday, was put in place to address what he has described as a wave of illegal immigration from Central America.

"If the illegal migration crisis is alleviated through effective actions taken by Mexico, to be determined in our sole discretion and judgment, the tariffs will be removed," Trump said in a statement.

"President Trump, social problems are not resolved with taxes or coercive measures," responded Mexican President Andres Manuel Lopez Obrador via his official Twitter account. "You know we are fulfilling our responsibility to stop (migrants) moving through our country, as much as possible and without violating human rights."

Mexico's U.S. imports have surged to multi-year highs in recent months as manufacturers around the world -- and particularly China -- shift production to the NAFTA state in order to avoid tariffs and trade restrictions recently put in place by Washington.

With more than $86 billion in exports to the U.S. over the first quarter of this year -- and a seven-year high of $347 billion in 2018 -- Mexico is now the biggest U.S. trading partner and home to more than a fifth of the region's automobile production facilities. Around $93 billion, or 26%, of last year's import total was comprised of autos and associated parts, according to Goldman Sachs calculations. 

General Motors (GM) - Get Report  has the biggest U.S. presence in Mexico, with its three assembly plants building more than 800,000 cars last year, a 44% increase from 2010 that has draw direct criticism from Trump as CEO Mary Barra unveiled plans to close four U.S. production facilities late last year.

GM has produced just under 67,500 cars in Mexico so far this year, according to data from the Mexican Automotive Industry website, a 7.5% increase from the same period last year. 

GM shares were down 4.8% to $33.17 on Friday, a move that wipes out its gains for 2019.

Ford Motor Co (F) - Get Report is also ramping up electric vehicle production in Mexico -- while unveiling sweeping global job cuts -- with a move to swap a battery-electric crossover vehicle assembly plant to Cuautitlan instead of an earlier aim to build it in Flat Rock, Michigan.

Ford's Mexican production was tabbed at 20,234 vehicles over the four months ending in April, down 14.7% from the same period in 2018.

Ford shares fell 2.9% to $9.46, a move that would trim the stock's year-to-date advance to around 20%. 

European carmakers with notable Mexican exposure were also under pressure Friday, sending the Stoxx Europe 600 Automobiles and Parts index down 3.2% to a Jan. 3 low of 453 points.

Germany's DAX index was marked 1.44% lower as automakers such as Volkswagen AG (VLKAY) , Daimler AG (DMLRY) and BMW AG (BMWYY) -- all of which have production facilities in Mexico -- slid more than 2.2% as investors reacted to the new tariff move and grew increasingly concerned that Trump could reconsider his recent reprieve on European auto levies.

In Asia, Toyota Motor Corp (TM) - Get Report shares fell 2.85% as investors fled the world's second-largest carmaker, while trimming positions in domestic Japanese rivals Nissan Motor Co.  (NSANY) and Honda Motor Co. (HMC) - Get Report , all of which have significant production facilities in the NAFTA state.