The automotive industry is bearing the brunt of trade-war crossfire again as U.S. President Donald Trump threatens to slap tariffs of as much as 25 percent on goods from Mexico, a key production hub for carmakers from Mazda Motor Corp. to General Motors Co.

Mexico is the largest source of U.S. vehicle and auto-parts imports, meaning tariffs would increase costs for virtually every major manufacturer. In late night tweets Thursday, Trump warned tariffs would start at 5 percent on June 10 and increase to 25 percent on Oct. 1 unless Mexico stops immigrants from entering the U.S. illegally.

The world’s largest automakers — including Ford Motor Co., Toyota Motor Corp. and Volkswagen AG — lost $17 billion in market value in Friday trading. The Bloomberg World Auto Manufacturers Index slumped as much as 2.2 percent and ended the week at the lowest since July 2016.

“Tariffs will mean higher price tags on cars for sales in U.S. and that will hit sales,” said Seiichi Miura, an analyst at Mitsubishi UFJ Morgan Stanley. “While the impact will differ for each carmaker, all of them have moved into Mexico.”

RBC Capital Markets analyst Joseph Spak said in a research note that the Mexican tariffs could be “devastating to the entire auto value chain” and that a 5 percent tariff could result a $300 per vehicle hit.

Autos are at the heart of U.S. trade talks with Japan and the European Union. “If Trump will put these tariffs on Mexico, there will be no hesitance to tariff Europe,” he wrote.

Already, Trump’s steel and aluminum tariffs have added billions of dollars to the cost of assembling U.S. vehicles, and tariffs on Chinese-made parts have also hiked costs. Companies like General Motors Co. Tesla Inc., Fiat Chrysler Automobiles (FCA) and dozens of parts suppliers have petitioned for relief.

GM and Ford Motor Co. have laid off thousands of workers in recent months, citing a rapidly changing industry. Other companies have cut hundreds of jobs.

Major suppliers like Delphi Technologies, Lear Corp. and Visteon Corp. all derive at least 22 percent of their global revenue from Mexico with a “meaningful portion” that crosses the U.S. border, Deutsche Bank said.

The industry also faces additional tariffs on Chinese-made goods. UBS warned that these, along with Mexican tariffs could push the U.S. economy into recession.

The industry has spent more than a year fighting to convince Trump not to carry through on a threat to impose up to 25 percent tariffs on all imported cars and parts on national security grounds. That decision has been delayed to allow for more trade talks with the European Union and Japan.

Trump, who has frequently boasted of a strong economy and stock market, believes the tariffs could actually boost U.S. growth. He said Friday that to avoid tariffs “companies will leave Mexico, which has taken 30 percent of our Auto Industry, and come back home to the USA.”

Industry officials say it takes years and billions of dollars to shift production, and that lower-margin vehicles cannot be built profitably in the United States.

GM, Ford and FCA shares all plunged at least 4 percent intraday in New York trading. Critical models imported from Mexico include GM’s Chevrolet Silverado and GMC Sierra and Fiat Chrysler’s Ram full-size pickups — the industry’s most profitable vehicles; Toyota’s Tacoma midsize trucks; and sedans including Nissan Motor Co.’s Versa and Sentra, Volkswagen’s Jetta and the Mazda3.

A 25 percent tariff would be worth $86.6 billion annually, which “could cripple the industry and cause major uncertainty,” Emmanuel Rosner, an auto analyst for Deutsche Bank, wrote in a report Friday.

Toyota and South Korea’s Kia Motors Corp. declined more than their respective benchmark indexes. Shares of Mazda, which is particularly reliant on Mexico, fell to the lowest since 2013.

In Germany, BMW AG closed at the lowest since November 2012. In the coming week, the automaker is slated to open a plant in San Luis Potosi that will make 3-Series sedans for the U.S. market starting later this year. Mercedes-Benz maker Daimler AG manufactures heavy trucks, buses and parts in Mexico.

Canada’s Magna International Inc., which has 32 facilities and more than 29,000 employees in Mexico, slumped as much as 5.8 percent in Toronto. Sweden’s Dometic Group AB, which manufactures climate-control systems for trucks and recreational vehicles, fell as much as 6.5 percent. The company said in April it planned to build a second plant in Mexico, moving additional capacity there from China. Autoliv Inc., which has more than 14,000 employees in Mexico making steering wheels, seat belts and air bags, dropped as much as 7.8 percent in Stockholm.

The latest tariff threat highlights how automakers and their closely intertwined supply chains are among the biggest losers of escalating trade tensions. Given the scale and global nature of auto manufacturing today, the industry has often been in the middle of the crosshairs of Trump, who has gone as far to say that imported cars represent a threat to U.S. national security.

Mazda’s Mexico factory last year made 183,266 cars. The company imports all vehicles it sells in the U.S., mostly from Japan and Mexico. It is now building a multibillion-dollar facility in Huntsville, Alabama, with Toyota.

Nissan has three plants in the country with a combined capacity of 850,000 vehicles annually. By comparison, Honda’s is 263,000, while Toyota’s is 200,000 units.

The tariffs would also affect South Korean automakers that make cars in Mexico. Kia exports about 80 percent to 90 percent of the 300,000 vehicles it makes a year at its Mexico plant to the U.S., according to SK Securities Co. analyst Kwon Soon-woo.

Earlier in May, Trump concurred with the conclusions of his Commerce Department, which investigated imports of vehicles and auto parts and found they harm national security by having led to a declining market share for “American-owned” carmakers since the 1980s. That prompted Toyota to issue an unusually strong-worded statement denouncing the administration’s policies.

Well before that, however, Mazda and Toyota had expressed concern over the looming threat of tariffs. They were among the dozens of carmakers and parts suppliers that filed comments to the Commerce Department in an effort to push against potential tariffs almost a year ago.

Japan’s government has tried to mount a charm offensive, seeking to forestall any retaliatory action against Japanese manufacturers and exporters. Prime Minister Shinzo Abe hosted Trump in Japan in May, making the president the first foreign head of state to meet Emperor Naruhito. The four-day itinerary included a state dinner, golf, a sumo wrestling match, a visit to warships and trade discussions.

“This news is further oil on the trade war fire and starts a new front with others (Japan) now thinking they could be next,” said Olivier d’Assier, APAC Head of Applied Research at Axioma. “The odds that Trump will target Japan next have clearly risen in their mind after today’s news.”