U.S. stocks took a beating on Thursday after President Trump announced stiff new tariffs on steel and aluminum imports. The Dow Jones industrial average dropped more than 500 points in early afternoon trading, but rose slightly to close down 420 points or 1.7 percent, at 24,608. The S&P 500 and Nasdaq composite index both fell 1.3 percent.

Stocks were higher earlier in the day after Federal Reserve Chairman Jerome Powell, testifying before Congress, appeared to calm one of the market's main worries when he said that he does not see inflation in workers' wages "at a point of acceleration." Investors have been nervous about the possibility that the Fed may get more aggressive about raising interest rates to beat down inflation.

But the market dropped into negative territory in the afternoon after Mr. Trump told steel and aluminum executives convened at the White House that he'll impose tariffs on imports next week. He said the tariffs will be 25 percent for steel and 10 percent for aluminum.

The Trump administration's more aggressive rhetoric on trade has ignited investors fears of a trade war, where countries throw up barriers that hurt the global economy and curb profits for exporters.

The steel and aluminum tariffs "raise the risk of retaliation from other countries," analysts at Capital Economics wrote in a research note. "While China currently accounts (directly) for only a minor share of U.S. steel imports, due to existing trade barriers, it is by far the world's largest producer, and officials are apparently now weighing up retaliatory restrictions on U.S. agricultural products."

Mexico and Canada are also likely to retaliate to tariffs on their steel production, the analysts added, noting that such measures would be incompatible with the North American Free Trade Agreement.

Get Breaking News Delivered to Your Inbox

Shares of steelmakers swung wildly amid speculation that the U.S. government would impose tariffs or quotas on steel and aluminum imports. They surged in the morning following reports that the White House planned to make the announcement shortly, only to lose most of the gains when subsequent reports said the announcement may not happen. They skyrocketed again after Mr. Trump told industry executives that he'll impose import tariffs "next week."

U.S. Steel (X) closed up $2.50, or 5.8 percent, at $46.01, and AK Steel (AKS) jumped 49 cents, or 9.5 percent, to $5.65.

Industrial companies that could be hurt by higher steel prices fell. Heavy equipment maker Caterpillar (CAT) lost $4.40, or 2.9 percent, to close at $150.23 and aerospace giant Boeing (BA) gave back $12.52, or 3.5 percent, to $349.69.

In a research note, analysts at Barclays said they expect the immediate effects of the tariffs on the American economy to be limited because aluminum and steel imports account for only about 2 percent of total U.S. imports. But they cautioned there are risks, specifically, "the response of U.S. trading partners and whether the administration's decision to impose restrictive trade policies is only the first in a series of moves."

The yield on the 10-year Treasury note dipped to 2.81 percent from 2.86 percent late Wednesday. The two-year yield slipped to 2.23 percent from 2.26 percent, and the 30-year yield dropped to 3.11 percent from 3.13 percent.

On the economic front, a raft of reports on the economy provided a mixed picture.

One report showed that inflation remains below the Fed's preferred target of 2 percent, but economists said that the advance for inflation in recent months has been enough to keep the Fed on track to continue raising interest rates. It raised rates three times last year, and investors are debating whether it will add another three or four increases this year.

Other reports showed that manufacturing is growing at its fastest rate in nearly 14 years, while construction spending was weaker than economists expected last month.