After slipping early, stocks gained back ground on Friday, as banks and tech firms cut losses and pulled broader indexes higher.
The Standard & Poor’s 500-stock index closed up, after falling by more than 1 percent early in the day. The rocky open to the trading day followed broad declines in Europe and Asia, as fallout from President Trump’s announcement on tariffs for steel and aluminum continued to rattle financial markets. On Thursday, major indexes fell sharply after Mr. Trump’s announcement, with the S.&P. ending the day 1.3 percent lower.
On Friday, the Nikkei 225 in Japan fell 2.5 percent, and the Hang Seng Index in Hong Kong closed down 1.5 percent.
Major indexes in Europe were also down broadly, with the CAC 40 in France and the Xetra Dax 30 in Germany declining by more than 2 percent. The Stoxx Europe 600 index saw nearly every sector decline on Friday.
At a meeting with industry executives on Thursday, Mr. Trump said he would formally sign rules enacting tariffs of 25 percent on steel and 10 percent on aluminum next week, surprising some of his closest advisers, who had urged him not to pursue such measures.
Jean-Claude Juncker, the president of the European Commission, said on Thursday night, shortly after the comments by Mr. Trump, that the tariffs appeared to represent “a blatant intervention” to protect the United States steel industry. He vowed the bloc would not “sit idly while our industry is hit with unfair measures that put thousands of European jobs at risk.”
Canada accounted for the largest share of steel imports into the United States, about 16 percent in 2017, according to the latest data from the United States Department of Commerce’s International Trade Administration. Brazil, South Korea and Mexico are the next biggest exporters to the United States, according to the Commerce Department.
“Any tariff measures that include steel or aluminum from Ontario could have serious negative impacts on workers and businesses on both sides of the border,” Kathleen Wynne, the premier of Ontario, the most populated province in Canada, said on Thursday.
Hans Jürgen Kerkhoff, the president of the German Steel Federation, said the proposed tariffs plan “clearly infringes” on World Trade Organization rules and urged the European Union to take action.
In Europe, Germany accounted for about 4 percent of United States steel imports last year, followed by the Netherlands, with 2 percent; and Italy, with 1.4 percent, according to United States data. Britain accounted for about 1 percent of steel imports last year, and France had less than 1 percent.
Steel makers based outside the United States were generally trading lower on Friday after the trade announcement.
Jeremy Lawson, chief economist at Aberdeen Standard Investments, said the market might be waking up to strains of protectionism that had been emerging as part of the Trump administration’s policies.
“Up until now, most of the market behavior over the past 12 to 15 months has been a reaction to macro economic environment, the big sort of tax policy changes,” Mr. Lawson said. “The creeping protectionist that we are sort of seeing in the announcements around Canada lumber, solar panels, washing machines, the Section 232 investigation that preceded this announcement, the intellectual property investigation around China — these types of things don’t really appear to have affected markets up until now.”
The market may also be factoring in potential retaliation in terms of trade by the European Union and China as a result of the Trump administration’s actions, he said.