A steel plant in Salzgitter, Germany
A steel plant in Salzgitter, Germany. The Trump administration said on Thursday it was moving forward with steep tariffs on steel and aluminum imported from Europe, Canada and Mexico.CreditMarkus Schreiber/Associated Press

WASHINGTON — The Trump administration said on Thursday that it would impose tariffs on metals imported from its closest allies, a measure certain to strain diplomatic relationships and provoke retaliation against businesses and consumers in the United States.

Tariffs of 25 percent on steel and 10 percent on aluminum from the European Union, Canada and Mexico, which together supply nearly half of America’s imported metal, are to take effect at midnight Thursday, Wilbur Ross, the commerce secretary, said on a call with reporters.

The move follows months of uncertainty during which the Trump administration dangled potential exemptions to to the tariffs in return for concessions on other fronts, including voluntary limits on metal shipments to the United States and reduced tariffs on imports from America.

In trying to create leverage by keeping its trading partners guessing, the administration sowed an atmosphere of chaos among allies as well as manufacturers uncertain about the ultimate impact on their vast supply chains.

After the metal tariffs were first announced in March, the countries targeted on Thursday secured temporary exemptions while the administration continued to negotiate with Canada and Mexico over the North American Free Trade Agreement and with European officials over other trade-related matters.

ut Mr. Ross said on Thursday that, although the discussions with the Europeans had continued, there had not been enough progress to warrant either another temporary exemption or a permanent exemption.

The tariffs are meant to make good on President Trump’s promises to protect American industry. But they have prompted a fierce response from United States allies that have already prepared lists of American products they plan to target with tariffs.

American businesses that use steel and aluminum have also objected, as their costs rise and their overseas sources of materials dwindle. The move has even provoked criticism from some corners of the steel and aluminum industries, which are closely integrated with their Canadian counterparts and had fought for an exemption for Canada.

The Aluminum Association, which represents most of the aluminum producers in the United States, said on Thursday that it was “disappointed” by the announcement. Heidi Brock, the association’s president, said the move would do little to address the larger issue of overcapacity in China “while potentially alienating allies and disrupting supply chains that more than 97 percent of U.S. aluminum industry jobs rely upon.”

European officials are preparing to impose retaliatory levies on an estimated $3 billion of imported American products later in June. The European tariffs will target goods like bourbon and Levi’s jeans that are produced in states represented by Republican lawmakers who have supported Mr. Trump’s stance.

Mexico announced retaliatory tariffs of its own on Thursday, targeting a imports from the United States that included flat steel, lamps, pork products and prepared meat products, apples, grapes, cranberries and cheeses. The goods had been chosen to have the strongest impact on areas that supported Mr. Trump, analysts said.

Combined with similar measures being prepared by China, Russia and Turkey, the impact of the penalties on American goods was expected to be severe.

Jean-Claude Juncker, the president of the European Commission, called the tariffs “protectionism, pure and simple.” He added that the United States had left Europe with no choice but to proceed with a case at the World Trade Organization as well as tariffs on American products.

The tariffs have been carried out under a legal measure that revolves around protecting America’s national security, with the Trump administration arguing that imports have weakened the industrial base that allows the country to manufacture tanks, weapons and armored vehicles. Mr. Ross defended the principle on Thursday, saying, “We take the view that without a strong economy, you can’t have strong national security.”

The European Union and Canada have objected strongly to the use of the national security argument, citing their close alliance and defense agreements with the United States. On Wednesday, Chrystia Freeland, Canada’s foreign minister called the idea that metal imports from her country would threaten American national security “frankly absurd.”

Last week, the Trump administration announced it was launching a similar national security investigation into imports of automobiles, a market many times as large as steel and aluminum. The vast majority of American automobile imports come from Canada, Mexico, the European Union, South Korea and Japan.

Liz Alderman contributed reporting from Paris, and Elisabeth Malkin from Mexico City.