Canada's main stock index largely shrugged off escalating trade tensions between Canada and the U.S. while the loonie and New York markets dipped as the Trump administration moved to add new tariffs on metal imports.

The tariffs the U.S. is imposing on steel and aluminum products from a number of close allies -- including Canada, Mexico, and Europe -- prompted the Trudeau government to announce dollar-for-dollar tariff "countermeasures" on up to $16.6 billion worth of U.S. imports.

The latest clash in continuing disputes between the U.S. and its trading partners left the TSX slightly higher on the day as markets learn to live with increased uncertainty, said Kevin Headland, senior investment strategist at Manulife Investments.

"The overall uncertainty surrounding trade, I don't think comes as much of a surprise. I think perhaps that's why the market is kind of shrugging it off, at least the TSX."

Countries including Canada had been operating under a short-term exemption from the metal tariffs the U.S. had already imposed on China and other countries to prop up its domestic industry, so ending the exemption didn't add any layers of uncertainty, said Headland.

"It wasn't so much of a shock, it's kind of more of an acceptance, ok here's what it is, let's go forward and figure out how we're going to do this."

The Toronto Stock Exchange's S&P/TSX composite index swung to positive territory in late trading to close up 12.84 points at 16,061.50, led by base metals and financials.

The Canadian dollar was down 0.31 of a US cent on the day to average 77.23 cents, but had recovered somewhat from a deeper dip as investors digested the morning's news that the U.S. would impose new tariffs and the Canadian economy performed worse than expected in the first quarter.

The dip comes as Thursday's events revealed further pessimism on NAFTA negotiations, after Prime Minister Justin Trudeau said he said he had declined to meet with U.S. President Donald Trump on trade after the U.S. demanded to add a sunset clause to any deal.

"The optimism the markets were talking about regarding the NAFTA agreement only a few months ago has perhaps washed away," said Headland.

Upcoming elections in the U.S., Mexico, and provincial elections in Ontario will only further complicate negotiations if they don't wrap up soon, he said.

The trade uncertainty is restraining business investment, said Bank of Canada deputy governor Sylvain Leduc Thursday, though he added that business sentiment and investment intentions remain positive.

Canadian economic data out Thursday showed GDP grew 1.3 per cent in the first quarter to meet last month's forecast but come in weaker than many private-sector economists had expected.

Headland said underlying business fundamentals remain strong and he still expects the Bank of Canada to increase the key rate in July, even if trade issues cloud the picture.

"We had the rally yesterday on a bit more hawkish tone from the Bank of Canada, and then the trade uncertainty comes back to the forefront of the news, it's kind of like a back and forth of what news cycle is leading."

U.S. markets took Thursday's developments harder, as the Dow Jones industrial average closed down 251.94 points at 24,415.84, the S&P 500 index ended down 18.74 at 2,705.27, and the Nasdaq composite index was down 20.33 points at 7,442.12.

The July crude contract ended down US$1.17 cents at US$67.04 per barrel and the July natural gas contract closed up seven cents at US$2.95 per mmBTU.

The August gold contract closed down US$1.80 to US$1,304.70 an ounce and the July copper contract ended even at US$3.07 a pound.