New York Federal Reserve President William Dudley lambasted tariffs and other protectionist trade policies on Thursday.

"Raising trade barriers would risk setting off a trade war, which could damage economic growth prospects around the world," Dudley said in a speech at the Central Bank of Brazil in São Paulo. Although short-term gains are appealing, "in the longer term it would almost certainly be destructive."

The speech comes the same day that President Trump announced that he would impose a 10% tariff on imported aluminum and a 25% tariff on imported steel. It was unclear if Trump would exempt any countries from the measure. Brazil, where Dudley spoke, is one of the top steel exporters to the United States. Trump said the tariff would be made official next week.

Trade economists say Trump's actions could spark retaliation from China and other nations. That would be a trade war.

Dudley, currently the No. 2 in rank on the Fed's powerful policy committee, did not name Trump, nor did he address the specific measures on steel and aluminum. But his views clearly conflict with Trump's view on trade.

Dudley, not known for gloomy remarks, said trade restrictions, such as tariffs or quotas, won't save jobs as Trump believes. Dudley added that higher trade barriers "often backfire," and create long-term costs in the form of retaliation, higher consumer costs, higher production costs and less competitive industries in the United States.

"The expectation that higher trade barriers would save jobs ignores these critical second-round effects," Dudley said.

Dudley noted that free trade hasn't benefited everyone, and that countries must pursue policies that better distribute the economic and social gains of globalization. He advocated for more job training, job search assistance and unemployment aid.

Dudley also dismissed the US trade deficit as a major concern. Trump's trade team is renegotiating NAFTA, the pact with Canada and Mexico, and his stated, top goal is to slash the US trade deficit with Mexico. He says the $71 billion trade deficit shows America is losing companies, money and jobs to Mexico.

Dudley says foreign investment in the United States fills in the gap of the trade deficit.

"There are many approaches to dealing with the costs of globalization, but protectionism is a dead end," Dudley said.