When Canada and Michigan agreed to build a multibillion-dollar bridge at the busiest border crossing between the United States and Canada, the relationship between the two nations was dramatically different.

In 2012, President Barack Obama was admired by an overwhelming majority of Canadians in polls, and the countries were often in agreement, including on border security and increased military cooperation. To honor both countries, the bridge linking Windsor, Ontario, and Detroit was named after the Canadian hockey star Gordie Howe, who played 25 seasons with the Detroit Red Wings.

On Friday, the 6.4 billion Canadian dollar bridge (about $4.5 billion) opened, at least ceremonially, with a president in the White House who has shaken Canada’s economy with tariffs, mused about annexing the country and stalled the opening of the Gordie Howe International Bridge.

The latest blow came this week when President Trump, who is as disliked in Canada as Mr. Obama was acclaimed, announced 50 percent tariffs on a variety of Canadian products worth $20 billion. For Canada, it’s all been too much. It rescinded its invitations to American officials to jointly open the bridge. And it moved the ceremony from the international border line in the center of the bridge to a vast expanse of pavement at the inspection plaza of the Canada Border Services Agency.

“In light of trade action threatened by the United States earlier this week, it would be inappropriate to proceed with a celebratory event between the two countries,” the office of Canada’s infrastructure minister said in a statement. “The Gordie Howe International Bridge remains a vital infrastructure project that reflects years of hard work and will be a major economic driver.”

In the middle of the ceremony, which included a ribbon cutting and an Indigenous drumming ceremony, Mr. Trump remarked on social media about the change of plans.