Anti-immigrant resentment helped persuade 52 per cent of Britons to vote to leave the European Union last week. The man who will represent the Republican party in this year's U.S. presidential election spouts racist, nativist rhetoric to the cheers of millions of supporters. Far-right parties promising to keep immigrants out and jobs in are on the rise from Poland to France. Newly inked free-trade agreements in Europe and the Pacific sit unratified. Anger, intolerance, suspicion, even hatred seem to be surging everywhere.

Except here. Why not here? Why not Canada?

This peaceable kingdom is an oasis of openness in a world of closing doors. While other countries reject or threaten to reject people fleeing conflict, the new Liberal government airlifted 25,000 Syrian refugees to Canada between December and February, with enthusiastic public support.

Story continues below advertisement

Immigration to Canada increased from an average of 217,000 annually during the Chrétien era to 255,000 annually under Stephen Harper, while the Trudeau government has set a target of 300,000 for 2016.

We don't just take in more immigrants, per capita, than any other country, we're taking in more than ever before, with almost no one complaining.

"Polls show that Canadians are much more positive toward immigration than other places, such as the U.S. or Europe," observes Rupa Banerjee, a professor at Ryerson University who studies immigration issues. She attributes that positive attitude to the points system, which encourages a diverse range of immigrants, and to a strong government emphasis on recruiting immigrants who bolster the economy.

On trade, Donald Trump vows to tear up the North American free-trade agreement and to launch a trade war against China if he is elected, while Britain has voted to leave the European Union. Canada's government, in contrast, recently signed trade agreements with the 28 nations of the European Union, the 12 countries that negotiated the Trans-Pacific Partnership and other countries in Asia, Latin America, the Middle East and Europe, with broad public support.

Even as insular, intolerant governments rise to power in places such as Poland and Hungary, or threaten to in other European nations and in the United States, the Canadian government moves to legalize marijuana, protect the rights of transgender Canadians and legislate conditions for a medically assisted death.

That forward-thinking approach to social policy is the principal reason this country ranks so highly in the Social Progress Index, which measures countries based on social and environmental indicators. Canada came in second in the latest annual survey, which was released this week.

Analysts in the United States and Europe have blamed the rise of nativist populism on a breach between globalist elites and economically stressed working- and lower-middle-class white voters. But Canada continues to embrace diversity in every form: We have elected, without fuss, three female premiers (Christy Clark of B.C., Rachel Notley of Alberta and Kathleen Wynne of Ontario), two who are openly homosexual (Ms. Wynne and Wade MacLauchlan of PEI), and two who are indigenous (Peter Taptuna of Nunavut and Bob McLeod in Northwest Territories). City councillors, mayors, MPPs and MLAs and Members of Parliament reflect (though not yet fully) Canada's amazing open-heartedness.

Story continues below advertisement

So what is inoculating this country against the intolerance infecting other Western nations? Part of the answer could lie in Quebec.

Since the days of the Quiet Revolution, French Canada has pursued a socially progressive, communitarian agenda. Quebec pioneered the modern public pension plan; Quebec legislated the first charter of human rights in Canada and was the first to protect sexual minorities within that charter; Quebec was the first to enact a government-directed child-care program.

"The anchor of Quebec might be a determining factor," in Canada's social inclusiveness, says Micheline Labelle, a sociologist at the University of Quebec at Montreal.

Even the sovereigntist movement that dominated Canada's political discourse for so many years "has a civic – versus ethnic – concept of nationalism and a world view based on openness," she believes.

The need to accommodate the sometimes-differing interests of English and French Canada also contributed to "that dynamic of compromise, based on each other's unique culture," that made it easier to integrate subsequent waves of immigrants from a host of differing cultures, says Mohammed Hashim, a Toronto-based labour organizer who promotes greater inclusivity for Muslim Canadians.

"Visible minorities," as Statistics Canada calls them, now represent about 20 per cent of the Canadian population, concentrated in suburban ridings surrounding Toronto, Vancouver and other cities, making them a formidable voting bloc.

Story continues below advertisement

No surprise, then, that all major federal political parties compete in proclaiming their support for multiculturalism and ever-higher levels of immigration. Simply put, no federal politician can afford to spout anti-immigrant rhetoric because no government can get elected without them.

Another reason for Canada's openness toward the world involves the imperative of trade. Our population is too small and dispersed to succeed as an internal market for everything we produce. Arguments about the need to close borders in order to husband jobs do less well here because so many Canadians know their own job depends on access to foreign markets.

"There's the realization that 35 million of us can't make it if we close our borders," observes Patrick Leblond, a University of Ottawa political scientist and senior fellow at the Centre for International Governance Innovation.

But we shouldn't be too smug.

Canada's enlightened immigration policy is as much the product of good luck as good management: having three oceans for a border guarantees that Canada lets in only who it wants to let in. And we let in only those who can contribute.

"When Canadians think of immigration, they often think of a professional from India who comes with an invitation from the government in hand, and is doing well and paying taxes," says Jeffrey Reitz, who studies immigration issues at the University of Toronto. "When Americans, for example, think of immigration they think of a Mexican who does not have an invitation, is working in low-paying jobs and possibly not paying taxes at all. So the immigrants are different."

Story continues below advertisement

That said, immigrants arriving to Canada more recently have struggled to find a footing. Studies show this generation of new arrivals is doing less well economically than the generation that came before. And there have been troubling incidents of public racism, such as an immigrant woman in London, Ont., who was allegedly assaulted last week by a shopper angry at her for wearing a hijab.

For Carla Peck, a University of Alberta education professor who studies attitudes toward diversity among the young, this points to the need "to have a meaningful, difficult conversation about the deeper issues – the very real issues – of individual and systemic discrimination, and oppression that people living in diverse societies experience." And that conversation, she says, needs to start in school.

Economic challenges also strain the social fabric. In the last century, the economist Joseph Schumpeter talked about "creative destruction," the churn that accompanied the arrival of a new, disruptive technology. Today, we are at Peak Schumpeter, with vast swaths of the economy transforming before our eyes. Netflix. Uber. Fintech. Amazon. Who has a landline any more? Who uses a travel agent? And what will Apple or Google or Facebook invade next?

In this disruptive world, millennials live from contract to contract, the defined-benefit pension becomes the stuff of legend, and the guy flipping hamburgers who used to make Thunderbirds might look at a new arrival as competition, even a threat to whatever economic security he has left.

Prof. Banerjee worries about employers who are reluctant to hire immigrant workers because of a concern about language issues, or who treat foreign credentials with suspicion, or may simply be biased.

"Many immigrants are unable to find work in their field even though they are more educated and more qualified than ever before," she observes, stressing the need to educate employers in the competitive advantage they can enjoy by acquiring a more diverse work force.

Story continues below advertisement

Digital disruption also democratizes knowledge – we have the sum of human knowledge on our smartphones – even as it erodes the social buffers that protect and sustain communities, from the church or temple or mosque to the service club or political party, "the social institutions and cultural values that made it possible to have self-respect amid hardship," as The New York Times columnist David Brooks recently put it. Politics becomes more raw, a contest between competing ideologies with fewer and fewer buffers to smooth things out.

And let Canada never forget its own brief, alarming brush with populism – the troubled term of Rob Ford as Toronto mayor. Mr. Ford never attacked immigrants, at least publicly, but still ….

Our peaceable kingdom remains vulnerable to the chaotic mix of innovation and disruption that is firing up voters in other countries. It's for all of us – politicians, pundits and public alike – to listen, really listen, to each other, respect each other, and not get carried away.

We only have to look next door or across the sea to know what will happen if we don't.