TORONTO — As right-wing populism has roiled elections and upended politics across the West, there is one country where populists have largely failed to break through: Canada.

The raw ingredients are present. A white ethnic majority that is losing its demographic dominance. A sharp rise in immigration that is changing culture and communities. News media and political personalities who bet big on white backlash.

Yet Canada’s politics remain stable. Its centrist liberal establishment is popular. Not only have the politics of white backlash failed, but immigration and racial diversity are sources of national pride. And when anti-establishment outsiders have run the populist playbook, they have found defeat.

Outsiders might assume this is because Canada is simply more liberal, but they would be wrong. Rather, Canada has resisted the populist wave through a set of strategic decisions, powerful institutional incentives, strong minority coalitions and idiosyncratic circumstances.