Sorry to burst our national bubble, but Canadians aren't any more tolerant of immigrants than Americans or Europeans. What has sustained our generous attitudes toward newcomers is public faith in the integrity of our immigration and refugee systems. It helps that we've also been insulated from the chaotic influx of migrants that has produced ugly backlashes elsewhere.

More than most countries, we still control who gets in and the conditions of their entry.

Montreal Mayor Denis Coderre is the latest misguided politician who would seek to undermine this delicate balance for his own purposes. No surprise, here. Mr. Coderre has repeatedly shown himself to be no less a populist than Donald Trump, albeit of a different stripe, taking a jackhammer to prevent Canada Post from installing a community mailbox and pulling other childish stunts to pander to his base.

Story continues below advertisement

Globe editorial: Is Canada ready for Donald Trump's refugee crisis?

Read more: What's going on with Trump's immigration ban? A Canadian guide

Related: Asylum seekers' cold crossings to Canada: A guide to the saga so far

Mr. Coderre's latest stunt – having Montreal declared a "sanctuary city" – is of a different order. If it means what the mayor says it means – similar declarations by Toronto and Vancouver have proved mostly symbolic – it could do serious harm by contributing to an erosion of public trust in Canada's immigration and refugee system. Bragging about harbouring illegal immigrants invites an equal and opposite reaction from right-wing populists who'd shut the door entirely on asylum seekers. Do we really want Canadian politics to descend down this polarizing path?

Just whom is Mr. Coderre vowing to protect from those heartless Canadian immigration authorities, anyway? Not the hundreds of asylum seekers who have crossed the border illegally from the United States in the wake of the U.S. President's (now halted) immigration and refugee ban, a number that could rise as Mr. Trump prepares a judge-proof executive order and stokes overblown fears of mass deportations among illegal immigrants.

Asylum seekers to Canada who cross the border illegally are already automatically accepted into the country as refugee claimants with a right to an Immigration and Refugee Board hearing, and the ability to appeal to higher authorities if their claims are first rejected. They are not "undocumented immigrants" and enjoy the same access to most government services as Canadian citizens.

Those who claim asylum at an official Canada-U.S. border crossing can be turned away under what's known as the "safe third-country" pact, which, ironically, bears Mr. Coderre's signature. He was the federal immigration minister in 2002, as Canada struggled to contain a surge of refugee claimants from third countries through the United States. Canada deemed the U.S. refugee-processing system sufficiently protective of claimants' rights to justify turning them away here.

Story continues below advertisement

Nothing has changed, except for Mr. Coderre's political situation. Instead of being an ambitious Liberal cabinet minister with his sights on 24 Sussex Dr., he is a fief-building municipal politician seeking re-election and freed from the responsibility of balancing the interests of the entire country. His only opposition comes from the leftist-populist Projet Montréal, whose thunder he has deftly stolen by demonizing Canada Post, oil pipelines and, now, the egregious Mr. Trump.

By declaring Montreal a sanctuary city, asking local police to suspend co-operation with the Canada Border Services Agency, Mr. Coderre is only testing the limits of Canadian tolerance. The Trudeau government has an inkling of those limits. Despite admitting 40,000 Syrian refugees – carefully selected, mind you – the Liberals have been in no rush to rescind the safe third-country agreement or raise Canada's 2017 target for refugees in the wake of Mr. Trump's election.

By declaring Montreal a sanctuary city, Mr. Coderre is encouraging those whose refugee claims have been deemed bogus to stay in the country illegally. He is telling temporary foreign workers who have overstayed their visas to thumb their noses at the law. That law currently gives them abundant recourse, including appealing to the federal minister of immigration to stay here on compassionate and humanitarian grounds. Instead, Mr. Coderre would encourage the creation of a permanent underclass of undocumented illegal immigrants willfully hidden from one level of government by another.

All to win votes among progressives and pull the rug out from under Projet Montréal? That seems opportunistic and irresponsible given the already worrying urban-rural split in Quebec over immigration.

Broad support for an immigration and refugee policy that balances our international obligations to those in need with our own economic and national-security goals depends on public faith in the fairness and integrity of the system.

Canada has been lucky, so far, to get the balance right. Let's not ruin a good thing, Mr. Coderre.