Matthew Hays is a Montreal-based writer who teaches courses in journalism and cinema at Marianopolis College and Concordia University.

Canadian Prime Minister Stephen Harper speaks at a news conference in Toronto. (Nathan Denette/The Canadian Press/AP)

Despite the fatigue one might expect within the American electorate after two terms of a Democratic president, there’s anxiety within Republican ranks that their party may lose the 2016 election. Younger voters, voters of color and women voters (particularly if Hillary Clinton does, indeed, land her party’s nomination) will almost certainly favor the Democrats, and those demographic odds may well mean defeat for Republicans.

But there’s a way the GOP can avoid this demographic destiny: Look north to Canada’s Conservatives.

Since first winning election with a minority government in 2006, Canada’s Prime Minister, Stephen Harper — leader of the Conservative Party — has reshaped much of the direction of the country, and subsequently won a majority in 2011. Some pollsters are predicting the prime minister will once again sail into another majority government in the October election, though it’s difficult to tell because of Canada’s parliamentary system and three popular parties, as opposed to the two-party U.S. system.

How did the Conservatives manage to do this? After all, Canada is a notoriously liberal country, previously led for over 13 years by a liberal government. It’s country famous for its peace-seeking reputation abroad, no death penalty, gun control, universal healthcare, official bilingualism (federal government services are guaranteed in both English and French) and multiculturalism, and home to thousands who avoided the Vietnam-era draft (Canadian forces were not involved in the Vietnam War nor the 2003 Iraq invasion). The reverence the American left has for Canada is reflected by the view of progressives such as filmmaker Michael Moore, whose documentaries portray Canada as a veritable utopia, and who once boasted on Twitter that “Canada’s poverty rate is 40% lower than the U.S.’s.

In part, Harper benefited from timing. A decade ago, the Canadian right became fatigued by years of being shut out of power due to vote splitting between the traditional Progressive Conservative Party and the upstart Reform Party. (Harper had been a key part of the latter.) The two parties merged and with the right united, Harper had to figure out how to appease crucial swing voters who might be put off by his party’s potential to move away from the center and toward the political margins. So he visibly embraced racial and ethnic minorities; this may sound like an obvious approach, but given that he had played such a key role in the Reform Party, it was actually a huge roadblock.

Harper first cut his teeth in politics with the Reform Party, which, throughout the 1990s, offered the messages of limited immigration and ending multiculturalism as official policy. Supporters, who sounded a lot like Tea Partiers-in-waiting, often offered up little defense when asked if their views were less about immigration policy and more a xenophobic stance against Canada’s communities of color. This made his proactive campaign to attract racial and ethnic minorities that much more surprising.

The Reform Party’s rhetoric was often hostile to non-European immigration and to refugees. Harper began to change the tone by speaking in community halls and houses of worship to majority nonwhite audiences, making the case that their values —conservative, family values — were more aligned with Conservatives than with those of the Liberals or the left-leaning New Democratic Party.

“Immigrants have the same values as us,” one of Harper’s senior ministers, Jason Kenney, said in 1994. “We have to talk to them, to convince them,” he told Maclean’s Magazine. Harper reached out to the key demographics of Canadians of Chinese and Indian descent — two communities that are, in effect, voter goldmines in key suburban districts of both Vancouver and Toronto, places where Conservatives had to make inroads.

In April of this year, Harper welcomed Indian Prime Minister Narendra Modi for a state visit. The two appeared onstage at several rallies where Indian Canadians cheered for the leaders’ statements about new joint economic and cultural ventures. There are 1.2 million Canadians of Indian descent, and in a country of roughly 30 million people, that’s a significant voting bloc. Even Harper’s critics acknowledged this was a coup in terms of wooing the Indian Canadian vote. “Barriers have turned into bridges,” Modi said of his successful visit to Canada.

Snatching the mantle of multiculturalism from the Canadian Liberal Party was something once seen as unimaginable. It was Liberal Prime Minister Pierre Trudeau who declared that multiculturalism would be official government policy in 1971. Since then, immigrant communities have shown their loyalty by overwhelmingly favoring the moderate Liberal Party at the voting booth. Liberals declared Canada a nation where everyone was welcome. But by reaching out to minority voters and steadfastly reminding them that their values are his, Harper has managed to change that perception.

The other key to Harper’s outreach was moving past the issue of same-sex marriage. Harper knew that when members of his own party spoke about gay rights, they usually came across as intolerant and out of touch. But as in the U.S., voters’ discomfort with the idea of same-sex marriage eroded rapidly as a series of lower court decisions and the Liberal government’s eventual championing of same-sex marriage came into effect. Images of gays and lesbians getting married saturated the media as courts and provincial parliaments made the unions a legal reality and thus more accepted in Canadian society.

But Harper had his base to contend with, and he had promised them that if elected he would reopen the issue in parliament, and on December 7, 2006, he did. But the move was a shrewd: at that point, his government was still in the minority; he knew that the opposition parties would vote down his motion to reopen the debate on same-sex marriage, and that enough of his own members would dissent, effectively killing the motion. Harper could tell his base that he kept his promise, while simultaneously putting the contentious same-sex marriage issue behind him.

Granted, the comparison is imperfect: the U.S. and Canada are different countries, with different conservative voting bases. America has a much more powerful religious right, and the porous U.S.-Mexico border makes the issue of immigrants entering the country illegally much larger.

Harper’s success at the polls, however, has allowed him to reshape a country once regarded as staunchly liberal. Since coming to power, he has scrapped a major piece of gun-control legislation (the long-gun registry), pulled Canada out of the Kyoto Protocol (and Canada was in fact one of the architects of that deal), enacted a foreign policy adamantly defensive of Israel, all while making as many Conservative appointments to the Senate and judiciary as possible. By shifting tone, Harper was able to reshape Canada in a Conservative direction.

It’s something Republicans have paid lip service to, but not really tried.

If the GOP really wants to win more nonwhite votes, the party has to be seen as fully embracing minorities, not merely tolerating them. And if Republicans want to win over swing voters, or get a bigger share of the youth vote — imperative in terms of winning the White House—they’re going to have to put opposition to same-sex marriage behind them once and for all.

GOP candidates have been breathing fire about same-sex marriage and Mexican citizens crossing the border. (“They’re bringing drugs. They’re bringing crime. They’re rapists,” Republican front-runner Donald Trump said of Mexican immigrants.) While reaching back to these contentious “wedge” issues to fire up the party’s base may seem a good idea during the process of choosing a nominee, when the actual election arrives, they’ll again look like the party of yesteryear, out of step with a changed America — a more tolerant, diverse and Canada-like country.

And they will once again be shut out of the White House.