Torontonians have rejected the tumultuous reign of the Ford brothers, choosing as their next mayor John Tory, a buttoned-up former provincial politician who won over voters with his promises of good governance and swift improvements to public transit.

Mr. Tory captured slightly more than 40 per cent of the vote, beating Doug Ford by 6 percentage points and 64,000 votes, a slimmer-than-expected margin of victory that suggests the diehard members of Ford Nation could still hold some political sway in Canada's largest city.

Indeed, Rob Ford, the man who achieved international notoriety for his crack smoking before bowing out of the mayoral contest to battle cancer, was handily re-elected to his old Etobicoke council seat, meaning he will return to challenge Mr. Tory at city hall if his health allows it.

Story continues below advertisement

The gruelling, 10-month campaign drew a record number of Torontonians to the polls, with 60.4 per cent of eligible voters casting ballots, up 10 percentage points from 2010.

For Mr. Tory, 60, his triumph was the crowning achievement of a career that had been marred by political disappointments, including failed runs for mayor in 2003 and premier in 2007.

He looked ecstatic as he navigated his way through hundreds of cheering supporters at the Liberty Grand in downtown Toronto.

"Tonight, we begin the work of building one Toronto – a prosperous, fair, respected and caring Toronto," he told the crowd. "Together, like never before, we begin building Toronto the Great."

For his part, Rob Ford hinted that the Fords were not ready to abandon their mayoral ambitions.

"If you know anything about the Ford family, we never, ever, ever give up," he told his cheering supporters. "I guarantee, in four more years, you're going to see another example of the Ford family never, ever, ever giving up."

Asked after his speech if he planned to run for mayor in 2018, Rob Ford said it was too soon to say. But he later told The Toronto Sun he plans to run in four years' time.

Story continues below advertisement

Earlier in the evening, when it was clear that Mr. Tory had won, the Ford brothers embraced in silence.

In China, where she is travelling on provincial business, Ontario Premier Kathleen Wynne heaved a sigh of relief.

"Hallelujah!" the Premier said as she heard the results.

While Ms. Wynne has remained nominally neutral in the race for mayor, her caucus broke heavily for Mr. Tory. Sources in government said the Liberals were fans of his signature Smart Track policy. And Liberals insiders fretted about the prospect of working with Mr. Ford for the next four years.

Mr. Tory, meanwhile, embraced his wife, Barbara Hackett, who stood by him during his past political failures. "I know at times in this campaign, things didn't seem too promising, and I know you were probably thinking, 'Oh boy, here we go again,'" Mr. Tory said to his wife on stage at the victory party. "Through it all … you stood firm."

Olivia Chow, the former MP and widow of late NDP leader Jack Layton, finished a distant third. She entered the race as the front-runner, but her lead evaporated over the summer. She captured just 23 per cent of the vote.

Story continues below advertisement

"All of us stand ready to help you as you get to work on making Toronto a great city," Ms. Chow said of Mr. Tory in her concession speech. "We will give you a hand."

Mr. Tory will need all the help he can get as he works to close a chasm that widened in the Ford era, one that often separated downtown dwellers from residents of Toronto's less-prosperous inner suburbs.

That divide was reflected in the map of Monday's results. Doug Ford captured most of Scarborough and central and north Etobicoke; Mr. Tory won in downtown, most of North York and the parts of Etobicoke and Scarborough closest to Lake Ontario.

Mr. Tory's council will have seven new faces, all but one of whom triumphed in vacant seats. Deputy speaker John Parker was the only incumbent to fall, losing his Don Valley West seat to local businessman Jon Burnside.

Mr. Tory will also have a handful of new counterparts in the 905 cities that ring Toronto, including Bonnie Crombie in Mississauga and Linda Jeffrey in Brampton.

Over the past four years, the humdrum proceedings of committee and council meetings at Toronto city hall often took a back seat to the mayor's inappropriate behaviour.

Story continues below advertisement

Rob Ford's denials and subsequent admission that he smoked crack cocaine captured international interest, at times transforming city hall into a curiosity for foreign media, late-night talk-show hosts and former professional wrestlers and rap singers.

Mr. Ford's staunch refusal to step down – even when council asked him to go – led to a dramatic political showdown. At a series of special council meetings last November, councillors stripped Mr. Ford of most of his power, leaving him mayor in name only and giving most of his authority, staff and budget to the deputy mayor.

The new term will bring an end to the makeshift two-mayor system and potentially turn the page on what has been a divisive period for Toronto and for its civic leaders.

In April, after months of denying he had a problem with addiction, Mr. Ford announced he would take a break from campaigning to attend rehab – nudged by a Globe and Mail report of a second video showing him smoking crack cocaine. Two months later, he returned to city hall and picked up where he left off on the campaign, participating in debates and telling reporters he felt healthy and "sober as a judge."

In September, the Fords announced another stunning development: Mayor Ford, who was in hospital with an abdominal tumour and later diagnosed with a rare form of cancer, was dropping out of the race. Brother Doug took up the Ford Nation mantle.

As he conceded defeat Monday night, Doug Ford said his family and its Ford Nation followers have won in another, perhaps more lasting way.

Story continues below advertisement

"We've ‎changed the landscape of politics across this country."

Mr. Tory, a former leader of the provincial Progressive Conservatives who painted himself as a centrist, was propelled to victory by a campaign that positioned him as a consensus-builder.

The centrepiece of his campaign was his SmartTrack transit plan, an $8-billion mostly surface subway that hinges on investments from the provincial and federal governments.

Mr. Tory's success will depend on his ability to form alliances with the 44 councillors elected Monday – many of them strong personalities on the left and right, including Rob Ford.

Elsewhere in the Toronto area, Bonnie Crombie won an unexpectedly easy victory in Mississauga, replacing long-time mayor Hazel McCallion, while Susan Fennell's 14-year tenure as Brampton's mayor ended as the city elected former MPP Linda Jeffrey to replace its scandal-ridden chief magistrate.

Ms. Jeffery, who resigned as Minister of Municipal Affairs and Housing to run for mayor in March, swept up 50 per cent of the votes counted so far while runner-up John Sanderson, a former city councillor, took 22 per cent. Ms. Fennell finished in third place with votes, or 13 per cent.

Story continues below advertisement

With reports from Oliver Moore, Jeff Gray, Dakshana Bascaramurty, Sahar Fatima and Adrian Morrow in China