TORONTO — As President Trump disrupts alliances across the map, nearly every level of government in Canada has taken on new duties in a quietly audacious campaign to cajole, contain and if necessary coerce the Americans.

Prime Minister Justin Trudeau’s strategy for managing Mr. Trump is unlike anything tried by another ally. And he has largely succeeded where even experienced leaders like Angela Merkel of Germany have fallen short.

More than perhaps any other country, Canada relies on the United States, which accounts for 70 percent of its trade. Its sizable manufacturing industry is tightly integrated with American production, meaning even a slight hardening of the border or prolonged trade negotiations could put its economy at risk.

Laid in the first days after Mr. Trump’s election win, the plan even enlists Brian Mulroney, a former Conservative prime minister and political nemesis of Mr. Trudeau’s father, who had also been prime minister. Mr. Mulroney knows Mr. Trump and his commerce secretary, Wilbur Ross, from social circuits in southern Florida, where all three keep vacation homes.