WASHINGTON (Reuters) - President Donald Trump announced on Thursday he would impose hefty tariffs on imported steel and aluminum to protect U.S. producers, risking retaliation from major trade partners like China, Europe and neighboring Canada.

Trump said the duties, 25 percent on steel imports and 10 percent on aluminum, would be formally announced next week, although White House officials later said some details still needed to be ironed out.

Trump believes the tariffs will safeguard American jobs, but many economists say the impact of price increases for users of steel and aluminum, such as the auto and oil industries, will destroy more jobs than curbs on imports create.

Shares of U.S. domestic steel and aluminum makers rallied, but shares of companies ranging from auto makers to airplane makers fell on the potential impact of the higher costs they will have to pay for the metals.

The announcement came after what one person with direct knowledge of the discussions described as a night of "chaos" in the White House due to frequent switching of positions in the administration.

The tariffs were sharply criticized by some senior Republican lawmakers as well as industries ranging from autos to oil to construction equipment. A major concern is that U.S. farm exports could be hit hard in retaliation by steel-exporting countries.

"Every time you do this, you get a retaliation. Agriculture is the number one target. I think this is terribly counterproductive for the agriculture economy," said Senator Pat Roberts, who chairs the chamber's agriculture committee.

CANADA READY TO RESPOND

China has already threatened to curb imports of U.S. soybeans, and the European Union has said it will consider action as well. President Xi Jinping's top economic adviser, Liu He, held talks with the Trump administration in Washington on Thursday.

The discussion was described as "frank and constructive", by a White House official, and focused on "ways to ensure fair and reciprocal trade."

Trade tensions between the United States and China have risen since Trump took office in 2017.

The tariffs will not directly hit China that hard. Data shows that Canada supplies 16 percent of U.S. demand for steel versus China's 2 percent and is by far the largest steel exporter, followed by Brazil and South Korea.

Other countries were already looking at how to respond.

"Should restrictions be imposed on Canadian steel and aluminum products, Canada will take responsive measures to defend its trade interests and workers," the country's foreign affairs minister, Chrystia Freeland, said in a sharply worded statement.

Brazil's industry ministry said Brazil would consider taking action on its own over the tariffs or in concert with other countries. Shares of two of its largest steel makers, Cia Siderurgica Nacional and Usiminas, sold off, closing down 4.4 percent and 4.2 percent, respectively.

Washington is already engaged in a dispute with Canada and Mexico over its proposed revision to the North American Free Trade Agreement, and months of tense talks have failed to produce any meaningful progress.

Asked whether there would be exemptions for any countries, White House spokeswoman Sarah Sanders said she would not get into any details ahead of next week’s announcement. She said the tariffs were still being finalized.

Although China only accounts for a small fraction of U.S. steel imports, its massive industry expansion has helped produce a global glut of steel that has driven down prices.

But the overall trend was down, with the Dow Jones Industrial Average falling 1.7 percent and the S&P 500 index down 1.3 percent.

Though the administration says duties would protect U.S. industry, critics say they would raise costs for industry and fail to deliver on Trump's campaign pledge to boost domestic jobs.

The tariffs were a victory for the trade hawks in Trump's administration, including White House trade adviser Peter Navarro, who has been rising in importance, and a setback for those who fear repercussions, such as top economic adviser Gary Cohn.

It had appeared unlikely that Trump would announce the tariffs on Thursday after a night of back and forth inside the administration.

"There was a lot of movement within the past 12, 16 hours," said the source who had knowledge of the discussions but who declined to be named due to the sensitivity of the issue.

"It was going to happen. It wasn’t going to happen and then it did happen," the source said.

The administration also cited national security interests for its action, saying the United States needs domestic supply for its tanks and warships. But the Department of Defense had recommended targeted steel tariffs and a delay in aluminum duties.

FEW MORE JOBS FROM TARIFFS

While American steelmakers lost three quarters of their jobs between 1962 and 2005, a major study by the American Economic Association showed that much of this reflected improved production technology, with output per worker rising fivefold.

"Thus, even if trade protection leads to increased domestic production, increases in employment may be far less than many hope," a report from the independent Econofact economist network said last week.

"Across many states, the number of jobs adversely affected in these steel-using industries could far exceed any steel jobs saved," Econofact warned.

The overall impact on the U.S. economy is likely to be muted, barring a major trade war, with steel and aluminum imports accounting for just 2 percent of the overall total.

Investment bank Barclays estimated the tariffs would add 0.1 percentage point to core inflation over a period of time and cut economic growth by 0.1-0.2 percentage point, which would be more than offset by Trump's fiscal stimulus.