WHO will uphold the torch of openness in the West? Not America’s next president. Donald Trump, the grievance-mongering Republican nominee, would build a wall on Mexico’s border and rip up trade agreements. Hillary Clinton, the probable winner on November 8th, would be much better on immigration, but she has renounced her former support for ambitious trade deals. Britain, worried about immigrants and globalisation, has voted to march out of the European Union. Angela Merkel flung open Germany’s doors to refugees, then suffered a series of political setbacks. Marine Le Pen, a right-wing populist, is the favourite to win the first round of France’s presidential election next year.  

In this depressing company of wall-builders, door-slammers and drawbridge-raisers, Canada stands out as a heartening exception. It happily admits more than 300,000 immigrants a year, nearly 1% of its population—a higher proportion than any other big, rich country—and has done so for two decades. Its charismatic prime minister, Justin Trudeau, who has been in office a year, has welcomed some 33,000 Syrian refugees, far more than America has. Bucking the protectionist mood, Canada remains an eager free-trader. It was dismayed by the EU’s struggle to overcome a veto by Walloons on signing a “comprehensive” trade agreement that took seven years to negotiate (see Charlemagne). Under Mr Trudeau, Canada is trying to make amends for its shameful treatment of indigenous peoples, and is likely to become the first Western country to legalise recreational cannabis on a national level.

Irredeemably dull by reputation, less brash and bellicose than America, Canada has long seemed to outsiders to be a citadel of decency, tolerance and good sense. Charles Dickens, bewildered by a visit to America in 1842, found relief in Canada, where he saw “public feeling and private enterprise in a sound and wholesome state; nothing of flush or fever in its system.” Modern Canada’s social safety net is stronger than America’s; its gun-control laws saner. Today, in its lonely defence of liberal values, Canada seems downright heroic. In an age of seductive extremes, it remains reassuringly level-headed.

Many of Canada’s virtues spring from its history and geography and are not readily exportable (see Briefing). It is easier to be relaxed about immigration when your only land border is protected by a wall the size of the United States. Appreciation for the benefits of trade comes more easily to countries next door to big markets. British Brexiteers might justifiably claim that they voted for exactly what Canada already has: control of immigration and the freedom to negotiate trade deals with any country willing to reciprocate.

Despite such luck, Canada suffers from some of the stresses that feed populism in other rich countries. It has experienced a decline of manufacturing jobs, stagnant incomes for most of its citizens and rising inequality. It, too, frets about a shrinking middle class. Canadians worry about Islamist terrorism, though the country has so far been spared a big attack. Some right-of-centre politicians, playing on fears that one will happen, indulge in Trumpian rhetoric. Yet Canada does not seem tempted to shut itself off from the world. What can other Western countries learn from its example?

First, Canada not only welcomes newcomers but works hard to integrate them. Its charter of rights and freedoms proclaims the country’s “multicultural heritage”. Not every country will fuse diversity and national identity in the same way that Canada does. Indeed, French-speaking Quebec has its own way of interpreting multiculturalism, which gives priority to the province’s distinct culture. But other countries can learn from the spirit of experimentation that Canada brings to helping immigrants find employment and housing. Its system of private sponsorship, in which groups of citizens take responsibility for supporting refugees during their first year, not only helps them adapt but encourages society at large to make them welcome. The UN High Commissioner for Refugees has called on other countries to copy it.

Follow the moose

The second lesson is the value of knowing when fiscal austerity does more harm than good. Canada has been managing its public finances conservatively for the past 20 years or so. Now in charge of a sluggish economy, Mr Trudeau can afford to give growth a modest lift by spending extra money on infrastructure. His government has given a tax cut to the middle class and raised rates for the highest earners to help pay for it. These economic policies deserve to “go viral”, the head of the IMF has said. Canada has a further economic lesson to impart in how it protects people hurt by globalisation. Compared with America, its publicly financed health system lessens the terror of losing a job; it also provides more financial support and training to people who do. And its policy of “equalisation” gives provincial and local governments the means to maintain public services at a uniform level across the country.

Perhaps most important, this mixture of policies—liberal on trade and immigration, activist in shoring up growth and protecting globalisation’s losers—is a reminder that the centrist formula still works, if politicians are willing to champion it. Instead of folding in the face of opposition to liberal policies, Mr Trudeau and his ministers have instead made the case for them. Although free trade is not the hot-button issue in Canada that it is in America, they have been tireless in listening to critics and trying to take their concerns into account.

Canada is far from perfect. It remains a poorer, less productive and less innovative economy than America’s. While championing freer international trade, Canada has yet to eliminate obstacles to trade among its provinces. For many liberals, Canada’s emphasis on “peace, order and good government”, enshrined in its constitution, is inadequate without an infusion of American individualism. But for now the world owes Canada gratitude for reminding it of what many people are in danger of forgetting: that tolerance and openness are wellsprings of security and prosperity, not threats to them.