In a stunning last-minute reversal, Toronto Mayor Rob Ford has withdrawn from the mayoral race, with brother Doug Ford registering instead to run in his place.

Doug Ford officially signed his registration papers Friday afternoon, just minutes before the deadline for candidates to submit their registration papers. The elder Ford's move came shortly after Rob Ford – who is in hospital with an abdominal tumour –withdrew his candidacy.

"I've asked Doug to finish what we stated together, so that all we've accomplished isn't washed away," Rob Ford said in a statement issued shortly after his brother's nomination papers were officially filed. "I have asked Doug to run to become the next Mayor of Toronto because we need him. We cannot go backwards."

Story continues below advertisement

Rob Ford said in his statement that his medical condition is too severe to continue in the gruelling campaign for mayor but will run as a councillor instead, because he "will not turn his back on Ward 2."

Doug Ford arrived at City Hall around 1:30 and walked into the mayor's office, not talking to the crowd of reporters who surrounded him. Shortly after, and flanked by lawyer Gavin Tighe and family friend John Nunziata – who also submitted his registration to run for council in Ward 12 – he appeared in the election services office, where he signed the paperwork.

At a press conference in front of the home of Diane Ford, the Ford brothers' mother, Doug spoke with reporters about why he registered Friday afternoon to run for the city's top job in place of his brother.

"Today, I stand here with mixed emotions and a very heavy heart," he said, his voice quivering as he spoke. Doug said that Rob "told me that he needed me to take the torch while he focuses on getting better."

Earlier Friday afternoon, the mayor's campaign spokesman Jeff Silverstein appeared at City Hall's election services office, where he submitted a withdrawal form with Mr. Ford's name on it. He later reappeared at the office to file registration papers for Doug Ford to run for mayor.

Mr. Silverstein also filed papers for Rob Ford to run instead as a councillor in Ward 2. Nephew Michael Ford, who until Friday was running in that ward, has dropped out of that race, and will instead run for Toronto District School Board.

Doug Ford had previously said that he was temporarily stepping aside from politics to return to the family business. In the past, he has also mused about a foray into provincial politics.

Story continues below advertisement

Mr. Ford has been in hospital since doctors discovered a tumour in his abdomen Wednesday, is in a "holding pattern" as his medical team work to complete diagnostic testing on him.

Mount Sinai colorectal surgeon Zane Cohen said Thursday evening that results of a biopsy – which will give doctors an indication of the seriousness of Mr. Ford's tumour – will not come back until next week at the earliest.

Friday's last-minute turn was just the latest drama in a controversy-filled term that has made Toronto's mayor the focus of international attention.

News of the mayor's illness, first made public by way of a press release issued by Humber River Hospital Wednesday evening, is the latest twist in a campaign that has been unusual from the very start. Rob Ford, who was stripped of most of his authority by Toronto city council after admitting he smoked crack cocaine while in office, is under police investigation and continues to refuse to speak with investigators.

Last month he was subpoenaed to testify in the trial of his former associate Alessandro (Sandro) Lisi, who is facing extortion charges. Mr. Ford has gone to Los Angeles to be a late-night talk show guest and has been the butt of jokes.

Mr. Ford has tried to put controversy behind him since he returned this summer from a two-month stint in rehab, even as the latest polls showed John Tory as the frontrunner. Mr. Tory and Olivia Chow, another front-runner in the race, went head-to-head for the first time Friday morning in a debate.

Story continues below advertisement

After offering the mayor his best wishes, Mr. Tory wasted no time slamming Doug at a press conference at his campaign office Friday where he accused both Fords of being "cut from the same cloth."

"Doug Ford, who is now a candidate for mayor, has repeatedly put down the members of city council who were his colleagues, and he has publicly disparaged the premier of this province and members of her cabinet," Mr. Tory said.

"I don't think Doug Ford offers four more years of the same. In fact, he may offer Toronto something that is worse."

Ms. Chow's spokesman Jamey Heath called it a "personal tragedy" for Rob Ford to have dropped out of the race, saying the move would profoundly change the dynamic of the race.

"Rob Ford is a formidable candidate. I don't think Doug is going to be able to fill his shoes,"‎ he said.

"With respect to people who do not want Rob Ford as mayor, they just got their wish," he added. "They have a Ford [on the ballot] but there is only one Rob Ford and he is not going to be mayor, and he's not running for mayor. And so, the choice is going to be Olivia Chow or one of the conservatives."

Story continues below advertisement

Meanwhile, supporters of the Ford family rallied in support of the brothers.

Councillor Peter Leon, who is not running for re-election, visited Rob Ford in the hospital to witness his nomination papers for the Ward 2 race.

"The mayor is just getting himself better, " Mr. Leon said, his eyes welling up. He said he spoke with him for a few moments and he was up and walking around. "This is very emotional. This is part of history, folks."

Mr. Nunziata, a former MP whose sister Frances Nunziata is a councillor in Ward 11 and ally of the Ford brothers, put his arm around Doug Ford as he signed his registration papers.

He said he'd decided only that same morning to register to run – and only in order to support the Ford brothers. "I think he'd make a fabulous mayor," he said of Doug Ford.

With a report from Oliver Moore