TORONTO — Andrew Scheer, an apple-cheeked social conservative and former House of Commons Speaker seen by some as a pragmatic, mainstream echo of Stephen Harper, survived a 13-ballot battle Saturday with rival Maxime Bernier as he eked out the narrowest of wins in the fight for the helm of the federal Conservatives.

The nail-biting process of winnowing the 13-candidate field went the full distance before Scheer, 38, was declared the winner with just 50.95 per cent of the available points, barely besting longtime front-runner Maxime Bernier, who posted 49.05 per cent after leading all 12 of the previous ballots.

“Every single kind of Conservative is welcome in this party and this party belongs to all of you,” the Ottawa-born Saskatchewan MP told the crowd during his victory speech.

“We all know what it looks like when Conservatives are divided; we will not let that happen again. We win when we are united.”

The ranks of the party are as large as they’ve ever been, thanks in large measure to the high-profile, hard-fought leadership race, and the party’s fundraising might appears to have renewed power, he added.

“I’m here to tell you there is renewed hope for Canada, starting today,” Scheer said. “Trudeau’s Liberals are so focused on photo-ops and selfies that they don’t care if their policies hurt and not help the middle class. Sunny ways don’t pay the bills.”

Some see Scheer’s focus on consensus-building as an important brick in the road back to government, much as Harper kept the various factions of the party in check in order to stay in power for more than 10 years. Others, though, accuse him of repressing his opposition to social lighting rods like abortion and same-sex marriage.

Last year, he supported party members who voted to remove a clause opposing same-sex marriage from the Conservative handbook, because he believes Canadians have moved on from the issue. Fellow Saskatchewan MP Brad Trost later embarked on his own leadership campaign as a result, finishing a respectable fourth.

“The leader’s job is to pick the common ground between all of those types of conservatives,” Scheer told a news conference after his win.

“There’s some aspects of issues that will divide our caucus and will divide our movement, and that doesn’t enjoy widespread support in the general public. But there are other areas — protecting freedom of speech, like cutting taxes for families, like protecting conscience rights for medical practitioners — those are all things that the entire conservative movement can get behind.”

Moments after the win, Scheer acknowledged the field and in particular thanked Bernier — who appeared to be fighting back tears of disappointment — and his other leadership rivals for their efforts and hard work.

Bernier is a longtime Quebec member of Parliament, but support in his home province appeared to collapse given his profuse opposition to the supply management system that regulates some of the province’s most lucrative agricultural industries. Indeed, Scheer’s campaign went to lengths to portray him as an alternative.

In the end, Scheer even won Bernier’s own riding, nabbing 51.1 per cent of the vote there.

Bernier said he remained committed to his own principles — and to the party. He said he sees a place for himself in a party led by Scheer, even though the ultimate victor’s stay-the-course approach differed so wildly from his own big policy ambitions.

“I like competition, it was a great competition,” said Bernier, visibly crushed. “I’m ready to work with Andrew; he did a great campaign, and that’s democracy, you know.”

Scheer’s speech drew the biggest cheers when he said he considers “the ability to have a debate about any subject” the cornerstone of a democracy, promising to “withhold federal grants from universities that shut down debate and can’t stand different points of view.”

He also used the politically loaded phrase “radical Islamic terrorism” when he promised to “recommit our air force to the fight against (the Islamic State of Iraq and the Levant).”

Saturday’s narrow margin of victory suggests a unity issue that’s likely to be a challenge for the party going forward — especially since Scheer takes his place as leader in the Commons on Monday.

Deepak Obhrai, Andrew Saxton, Rick Peterson, Kevin O’Leary, Chris Alexander, Steven Blaney and Lisa Raitt were some of the earliest casualties as early-ballot results were announced, while Kellie Leitch, Pierre Lemieux and Michael Chong fell off in subsequent rounds.

Gone in the 9th ballot was controversial Leitch, the former cabinet minister and orthopedic surgeon whose key campaign pledge to screen newcomers for Canadian values saw her dominate early media coverage of the race, only to fade from prominence as the vote grew nearer.

Brad Trost, who launched his campaign as a more hardline social-conservative alternative to Scheer, hung in longer than many expected, dropping off on the 11th ballot.

O’Leary dropped out of the race abruptly last month but was too late to have his name removed from the ballot.

The lengthy ranked-ballot system and the size of the field meant several rounds of balloting were necessary to crown a winner. Officials say 132,000 ballots — the party has some 259,000 eligible members — had been received by the Friday deadline for mail-in ballots.

Mesh bags released Conservative party balloons over the crowd at the Toronto Congress Centre as Scheer invited his fellow candidates and caucus members to join him onstage, to the strains of a guitar-heavy version of “We Are the Champions.”

Ahead of Saturday’s duel, outgoing interim leader Rona Ambrose took to the stage for one final farewell — and to send some words of advice to her successor.

Bedrock conservative values are more important than any policy proposals shared during the campaign, Ambrose said.

“When we rally around those values and speak with one voice there is no limit to what we can achieve together,” she said. “The measure of a good leader is also how they treat their opponents in defeat,” she quoted Harper as saying.

“Never forget that.”