At the same time, voters elected enough members of Parliament from the left-leaning New Democratic Party and the Greens to create a center-left parliamentary majority. Collectively, Liberals, New Democrats and Greens won more than 55 percent of the vote.

AD

This sent a message to the Conservatives: Pumping up anger in the base can win big majorities for the center-right in their strongholds but leave them stranded in metropolitan areas.

AD

Scheer’s Conservatives are up 26 seats but still at the wrong end of a 157-to-121 Liberal margin in the House of Commons. Given Trudeau’s mistakes, this was an election the Conservatives could have won. They failed in a revealing way. Their popular-vote margin was built by huge victories in the prairie, energy-producing provinces of Alberta and Saskatchewan, where Conservatives already held most of the seats.

But Scheer’s social conservatism and his opposition to Trudeau’s carbon tax went down very badly elsewhere, holding back his party’s gains in British Columbia, Ontario, Quebec and the Maritimes.

AD

One large piece of good news: Wonderfully moderate Canada rejected Maxime Bernier’s far-right breakaway People’s Party. Bernier, who proudly answers to the nickname “Mad Max,” lost his own seat, and his party got less than 2 percent of the vote. And in another blow to the right, Scheer was hurt in Ontario by the plunging popularity of the province’s right-wing populist premier Doug Ford, who is often compared to President Trump.

AD

The Angus Reid Institute found a strong negative connection between Ford’s approach and national Conservatives. Just under half of the Ontario electorate said Ford’s policies would influence their national votes, and 85 percent of those voters said this would push them away from the Conservatives. Trudeau happily tied Ford to Scheer. It worked. In Toronto, the Liberals won every single seat.

Trudeau is a complicated figure. He’s telegenic, fresh, broadly progressive and, at 47, young. He surprised those who underrated him by sweeping to victory in 2015 on a brilliant, risk-taking campaign rooted in “hope and hard work.” His signature pledge was to “sunny ways,” an appealing homage to optimism coined by legendary Canadian politician Wilfrid Laurier.

AD

But not all was sunny these past four years. Trudeau’s youth sometimes translated as callowness, and his insular inner circle didn’t challenge him enough. His administration was rocked by a scandal in which a former attorney general charged that Trudeau pressured her to drop the prosecution of a large Quebec-based company.

AD

During the campaign, Trudeau, who has made an embrace of a tolerant, open and multicultural Canada his calling card, was embarrassed when it was revealed that he wore blackface and brownface on several occasions when he was in his late teens and 20s.

Conservatives had hoped they could come into power on a split vote as progressives alienated from Trudeau scattered their ballots among the New Democrats (NDP), the Greens and, in Quebec, the resurgent nationalists of the Bloc Québécois. Trudeau’s warnings about the dangers of Conservative government stemmed the tide. They rallied support where his party needed it most.

AD

Still, the two stars of the campaign came from third parties. Jagmeet Singh of the NDP, a turban-wearing Sikh lawyer, is the first nonwhite leader of a major party. He proved effective in debates and lifted his party from what, a few months ago, looked like catastrophe. He salvaged 24 of the party’s 39 seats, roughly doubling earlier expectations. Singh hopes to use Trudeau’s need for allies to push the Liberals in a progressive direction on climate and health care.

AD

The bulk of the NDP’s losses came in Quebec, where a resurgent Bloc under Yves-François Blanchet, the night’s biggest winner, more than tripled its share of seats, from 10 to 32. One disturbing subtext: The Bloc’s newfound popularity was fed in part by support for a Quebec law banning some public servants from wearing religious garb or symbols, a statute being challenged in court by human rights groups.

Minority government is not unusual in Canada. Neither are regional divisions, although they ran particularly deep this year. Trudeau has been given a second chance by a country that still, on the whole, welcomes progressive government. The discipline that his lack of a majority will impose may be exactly what he needs.

AD

AD