Trump's announcement of a 25 percent tariff on steel imports could greatly affect products that you may not know depend on it, like Reddi-wip. (Jhaan Elker/The Washington Post)

President Trump on Thursday said he will impose punishing tariffs on imported steel and aluminum in a major escalation of his “America First” trade offensive, defying Republican congressional leaders, inviting retaliation by U.S. trading partners and shaking the stock market.

Speaking at the White House, the president said he had decided to levy tariffs of 25 percent on foreign-made steel and 10 percent on aluminum.

“We’ll be imposing tariffs on steel imports and tariffs on aluminum imports, and you’re going to see a lot of good things happen,” Trump said. “You’re going to see expansions of the companies.”

Trump’s move, under a little-used national security provision of U.S. trade law, is expected to trigger legal challenges by China, the European Union and Brazil at the World Trade Organization. It also prompted predictions that it will backfire on American farmers and other exporters.

“It’s pretty much our worst fears,” said Rufus Yerxa, president of the National Foreign Trade Council, which represents multinationals such as Microsoft and Caterpillar. “This is a pretty clear indication that the Trump administration cares more about the old economy than it does the new economy.”

Trump, however, fired back at critics Friday, claiming that trade wars can be “good” and suggesting more measures against trading partners were possible.

“When a country (USA) is losing many billions of dollars on trade with virtually every country it does business with, trade wars are good, and easy to win,” Trump wrote in a tweet. “Example, when we are down $100 billion with a certain country and they get cute, don’t trade anymore-we win big. It’s easy!”

Trump’s statement Thursday on the tariffs followed hours of drama and confusion. The president initially planned a formal announcement for Thursday morning, canceled it amid pushback from opponents, and then finally disclosed the new trade barriers after meeting with 15 industry executives.

“People have no idea how badly our country has been mistreated,” Trump said. “We’re bringing it all back.”

Canada, one of the United States’ closest allies, blasted the step as “absolutely unacceptable” and vowed to respond when the levies take effect.

Jean-Claude Juncker, president of the European Commission, dismissed Trump’s national security justification and said the tariffs were “a blatant intervention to protect U.S. domestic industry.”

He added, “We will not sit idly while our industry is hit with unfair measures that put thousands of European jobs at risk.”

Investors appeared shaken by the news. The Dow Jones industrial average sank 586 points, a loss of more than 2 percent, in early-afternoon trading before closing off 420 points. Early Friday, Asia markets followed suit, with Japan’s Nikkei-225 index down more than 2 percent in morning trade.

Trump’s tariff jab scrambled political lines, drawing condemnations from Republicans and conservative groups while earning applause from some Democrats.

“This welcome action is long overdue for shuttered steel plants across Ohio and steelworkers who live in fear that their jobs will be the next victims of Chinese cheating,” said Sen. Sherrod Brown (D-Ohio.) “If we fail to stand up for steel jobs today, China will come after other jobs up and down the supply chain tomorrow.”

For months, leading Republicans have trooped to the White House in the hopes of persuading Trump not to implement his plans to tear up trade agreements and levy tariffs on foreign goods. The president has listened, in recent weeks stressing hopes of negotiating an improved North American Free Trade Agreement rather than quitting the existing deal.

But on Thursday he highlighted the wide gap between his nationalist economic views and the traditionally pro-trade Republican mainstream, going beyond the toughest of the three options he had been presented.

“The President is proposing a massive tax increase on American families. Protectionism is weak, not strong,” Sen. Ben Sasse (R-Neb.) said in a statement. “You’d expect a policy this bad from a leftist administration, not a supposedly Republican one.”

Sen. Patrick J. Toomey (R-Pa.), in a statement, called the president’s decision “a big mistake that will increase costs on American consumers, cost our country jobs, and invite retaliation from other countries.”

Adam Brandon, president of the conservative group FreedomWorks, warned that new trade taxes “could be a lethal blow to all the economic success this administration has ushered in.”

The core of the problem for steel and aluminum producers is massive excess capacity in China. Annual excess steel production globally last year was 700 million tons, or more than seven times U.S. consumption.

All that surplus steel creates a buyer’s market and depresses prices, the Commerce Department said last month in recommending import limits. But the direct impact of the tariffs on China will be limited since it only accounts for around 2 percent of U.S. steel imports.

In a slap at China, Trump announced the tariffs even as a top Chinese economic official was in Washington for talks aimed at forestalling a possible trade war. Liu He, one of Chinese President Xi Jinping’s closest aides, was scheduled to meet with senior administration officials in a bid to restart a direct economic dialogue that lagged last year.

China’s Iron and Steel Association slammed what it called a “stupid protectionist move” but simultaneously said it would not have a big impact on China. “Nothing can be done about Trump. We are already numb to him,” Li Xinchuang, vice secretary-general of the association told Reuters.

Wei Jianguo, a former Chinese vice commerce minister, said the move would go against the WTO rules and hurt U.S.-China relations. “China does not want to see a trade war with the United States. But if Trump insists, China is not afraid of it,” Wei said.

The United States already has 169 trade taxes in place on various types of imported steel, including 29 on Chinese products. Some of the nation’s largest steelmakers, which sought the new tariffs, also are in good shape financially, with Nucor reporting a $1.1 billion profit last year.

Trump promised that the new tariffs would lead to “new jobs popping up” and spoke nostalgically about the industry. “If you could ever make U.S. Steel like it used to be, we’d be very happy. And I actually think it’s possible,” the president said.

U.S. Steel Corp. employs roughly 30,000 people today, down from around 200,000 in the 1960s.

Trump’s remarks left unanswered specifics about whether the tariffs will apply to U.S. allies such as Canada and the E.U. Several steelmakers — such as Arcelor­Mittal and Nucor — have production facilities on both sides of the border. The United States also runs a surplus in its iron and steel trade with its northern neighbor. For nearly a quarter-century under U.S. law, Canada has been considered part of the U.S. defense industrial base, as if its factories were American.

“Applying tariffs to Canada, despite its being part of the U.S. defense industrial base since the 1940s, will strengthen WTO claims that this decision is not really about national security,” said John Veroneau, a George W. Bush administration trade official now with the firm Covington & Burling.

Axel Eggert, head of the European Steel Association, said Trump’s move could cut European steel shipments to the United States by half.

Trump also rejected pleas from companies that are heavy users of steel and aluminum, including automakers and the beer industry, which warned that higher prices would hurt sales and potentially lead to layoffs. In 2002, the last time the United States imposed steel tariffs, steel users blamed the measures for the loss of up to 200,000 jobs.

Steel prices began moving Thursday as word of the tariffs leaked. One benchmark, for hot-rolled coil steel, posted a two-day rise of nearly 13 percent.

The aluminum tariff is forecast to create about 1,900 jobs at smelters — but will destroy 23,000 to 90,000 jobs in other manufacturing sectors, said Jorge Vazquez, managing director of Harbor Aluminum.

Agriculture has historically been a top target for retaliatory trade actions, and U.S. farm groups have warned that this time will be no different. Already, China is eyeing new duties on U.S. sorghum following the Trump administration’s decision in January to impose tariffs on washing machines and solar panels.

The damage to U.S. farmers, especially the soybean industry, could be substantial should China retaliate. U.S. farmers exported $14.2 billion worth of soybeans to China in 2016, nine times as much as was sold to the next-largest U.S. export market.

Other nations also have vowed to strike back.

According to Farmers for Free Trade, a bipartisan group, previous trade spats with Canada and Mexico have triggered crippling tariffs on U.S. produce, dairy products, pork, wine, beer and cheese.

“These tariffs are very likely to accelerate a tit-for-tat approach on trade, putting U.S. agricultural exports in the crosshairs,” Brian Kuehl, the group’s executive director, said in a statement. “Everyone agrees we need to hold our trading partners accountable, but taking unilateral action to raise tariffs carries harmful unintended consequences.”

Simon Denyer in Beijing and Brian Murphy in Washington contributed to this report.