President Donald Trump's metal tariffs on U.S. allies are actually a "gift" to China, according to one Obama-era trade representative.

"The world was aligned with the United States in recognizing China's threat around steel and aluminum," Robert Holleyman, a former deputy U.S. trade representative, told CNBC's "Squawk Box" on Friday. "We've now turned our ally Canada into a potential ally of China on these issues. It's nonsense, it's costly, it'll hurt exporters."

The Trump administration decided Thursday to impose tariffs of 25 percent on steel imports and 10 percent on aluminum imports from Canada, Mexico and the European Union.

The tariffs against Canada and Mexico come as the United States has been trying to renegotiate the 1994 North American Free Trade Agreement with its partners north and south of the border. Trump has repeatedly said if a better deal can't be crafted he would pull the U.S. out.

Holleyman, who was deputy U.S. trade representative from 2014 to 2017, said it's "almost impossible" to see a scenario where Trump's tariffs work out positively for American consumers and corporations.

Bruce Heyman, a former U.S. ambassador to Canada under former President Barack Obama, took the criticism of Trump's tariffs a step further, calling them a "hostile, misplaced, ill-conceived set of tariffs which make no sense."

"You're right in the middle of [NAFTA] negotiations that were not going badly," Heyman said on "Squawk Box." He noted that the negotiations did take a turn after Vice President Mike Pence's ultimatum.

Months of intense negotiations between the U.S., Canada and Mexico imploded when Pence demanded that any deal expire automatically in five years, according to Canadian Prime Minister Justin Trudeau.

Stocks tanked Thursday, with the Dow Jones industrial average falling more than 250 points, on fears of a possible trade war.

Commerce Secretary Wilbur Ross defended the tariffs on Thursday, telling CNBC the stock market will "adjust" to any changes in U.S. trade policies. He also said that ending the tariff relief on Canada and Mexico reflects the lack of progress in the NAFTA talks.

Steve Odland, president and CEO of the Committee for Economic Development, said Thursday that Trump is imposing tariffs to bolster trade leverage — and it's working. Odland was chairman and CEO of Office Depot from 2005 to 2010.