Ford's lawyers argued that his removal for violation of conflict of interest rules was "draconian" because the mayor made what they characterized as an honest mistake by taking part in a city council vote over repayment of $3,150 in donations he had solicited for his private football foundation using official city letterhead.
The Divisional Court seems to have found that argument convincing.
It ruled that council had no authority to order Ford to repay the money. Therefore, as Ford's lawyers had argued, Ford had no financial interest in the matter on which he voted.
"This has been a very, very humbling experience," Ford said hours after the decision was released.
"I have enormous respect for the judicial system and I'm very, very thankful for the decision it made today."
STORY CONTINUES BELOW SLIDESHOW
The lawyer who challenged Ford lamented the decision as "disappointing," saying Ford got off on a technicality.
The decision means Ford -- little more than halfway into his four-year term -- can stay in office, but the court did not completely absolve Ford of his behaviour surrounding the council vote.
"It is important, in the present case, not to lose sight of the nature of Mr. Ford's error in judgment," the court said.
The original judge to hear the case said Ford should not have participated in the vote. Ford had argued that he thought the conflict of interest laws only applied to situations in which the city had a financial interest, not when his personal conduct was at issue.
He was wrong, the Divisional Court said.
Ford's lawyers had argued the mayor made the error in good faith, but the court didn't agree, saying that could only stand up if he had done due diligence to ensure he wasn't in violation of the code.
"While he may have honestly believed his interpretation was correct, it would undermine the purposes of the (Municipal Conflict of Interest Act) a subjective belief about the meaning and application of the law was sufficient to excuse a contravention," the court wrote.
"Wilful blindness to one's legal obligations cannot be a good faith error in judgment."
But whether or not Ford made an error in voting on the matter, city council didn't have the power to make Ford repay the money because that went beyond possible sanctions laid out in the MCIA, the court ruled.
The decision of council was meant to punish Ford, the court found. There were other avenues in the code of conduct available to council, such as a request for an apology, the judges said.
"What is objectionable in the present case is the fact that a so-called remedial measure is being used for a punitive purpose," the court said.
"Certainly, from the perspective of an individual who is required to pay monies he never received personally, this is a financial sanction or penalty."
Ford vowed Friday to work hard during the remainder of his term and suggested he would run for re-election, saying he would "spend the next six years on getting the job done."
But Friday's decision may not mark the end of his legal woes.
The lawyer for the man who launched the challenge said his client will be taking the case to the Supreme Court of Canada.
"We believe that there are serious errors of law in the judgment and we will ask the Supreme Court of Canada for leave to appeal to that court," lawyer Clayton Ruby said in a statement.
"It must be acknowledged that such appeals are not easy but this remains an important issue for all citizens."
Barring a fresh legal odyssey, an audit of his campaign expenses is pending, Ford will now remain Toronto's mayor until the next election in December of 2014.
The legal action against Ford was launched by Toronto businessman Paul Magder, who argued the larger-than-life mayor violated the rules when he took part in a council vote.
Ford initially blamed a left-wing conspiracy for the previous court-ordered ouster, pledging to fight "tooth and nail" against the unprecedented ruling. He also vowed that, if he lost in the courts, he would go straight to the court of public opinion by running in a byelection, if the city called one.
With files from The Canadian Press
Toronto City Mayor Rob Ford watches players from Don Bosco Eagles, the High School team he coaches, warm up before they compete against the Huron Heights Warriors in the Metro Cup in Toronto on Tuesday November 27, 2012 Those whose antics threaten to besmirch the party name normally don't get a second chance with Canada's federal Conservatives. Not so, it would seem, for Toronto Mayor Rob Ford.
Toronto City Mayor Rob Ford reacts after Don Bosco Eagles, the High School team he coaches, lost 28-14 to Huron Heights Warriors in the Metro Cup in Toronto on Tuesday November 27, 2012.
Toronto Mayor Rob Ford hoists the Grey Cup on stage with Toronto Argonauts players while celebrating the team's Grey Cup victory in downtown Toronto on Tuesday, Nov.27, 2012.
Toronto Mayor Rob Ford addresses reporters at City Hall in Toronto on Tuesday November 27, 2012.
Toronto Mayor Rob Ford speaks to his Don Bosco Eagles team during the Metro Bowl quarter-final at Birchmount Park in Toronto, Thursday, Nov. 15, 2012.
Toronto Mayor Rob Ford, left, speaks to the media at city hall in Toronto, Monday, Nov.26, 2012. Ford has been ordered out of office after a judge ruled Monday he broke conflict of interest rules.
Toronto Mayor Rob Ford, right, walks to attend a toy charity event at city hall in Toronto, Monday, Nov.26, 2012. Ford has been ordered out of office after a judge ruled Monday he broke conflict of interest rules.
Toronto Mayor Rob Ford talks to media at city hall in Toronto, Monday, Nov.26, 2012.Ford has been ordered out of office after a judge ruled Monday he broke conflict of interest rules.
<a href="http://www.huffingtonpost.ca/2012/11/21/rob-ford-fall-gif-video_n_2170653.html">Rob Ford was at an event to promote the Grey Cup when he fell while hamming it up for the press. A GIF of the fall went viral on the Internet</a>.
Toronto Mayor Rob Ford, right, makes a few remarks as Chicago Mayor Rahm Emanuel listens, before the pair signed a new "sister cities" agreement Wednesday, Sept. 19, 2012, in Chicago.
Chicago Mayor Rahm Emanuel, left, makes a light hearted comment as Toronto Mayor Rob Ford laughs during the signing of a new "sister cities" declaration Wednesday, Sept. 19, 2012, in Chicago.
Toronto Mayor Rob Ford sits on the back of Chicago's First Lady as he takes in an architectural boat tour on the Chicago River Wednesday, Sept. 19, 2012. Ford was visiting the city on a Toronto-Chicago Business Mission.
Toronto Mayor Rob Ford, top left, relaxes during a boat tour with members of the Toronto-Chicago Business Mission on the Chicago River waterfront Wednesday, Sept. 19, 2012, in Chicago.
Toronto Mayor Rob Ford, top right, waves to photographers during a boat tour with members of the Toronto-Chicago Business Mission on the Chicago River waterfront Wednesday, Sept. 19, 2012, in Chicago.
Rob Ford Meets Butter Rob Ford
<a href="http://www.huffingtonpost.ca/2012/08/31/rob-ford-butter-sculpture-ex-cne_n_1846616.html" target="_hplink">Toronto Mayor Rob Ford comes face to face with a butter sculpture of himself at the Canadian National Exhibition</a>.
Butter Rob Ford
As part of an exhibition at the CNE, Toronto-based artist Olenka Kleban has made a <a href="http://www.huffingtonpost.ca/2012/08/24/butter-rob-ford-sculpture_n_1828527.html" target="_hplink">butter sculpture of Toronto's mayor</a>.
Dave Chappelle And Rob Ford
<a href="http://www.huffingtonpost.ca/2012/08/22/dave-chappelle-rob-ford_n_1822240.html?utm_hp_ref=canada-politics" target="_hplink">Comedian Dave Chappelle met briefly with Toronto Mayor Rob Ford</a> on Wednesday, Aug. 22, 2012
<a href="http://www.huffingtonpost.ca/2012/08/14/rob-ford-reading-driving-car-gardiner_n_1776183.html" target="_hplink">Rob Ford is seen reading while driving</a> in this photo from Twitter.
<a href="http://www.huffingtonpost.ca/2012/07/30/rob-ford-will-ferrell-zach-galifianakis-sketch_n_1719420.html" target="_hplink">Rob Ford meets with comedic actors Will Ferrell and Zach Galifianakis</a>.
Rob Ford poses with neo-Nazi Jon Latvis. <a href="http://www.huffingtonpost.ca/2012/07/26/rob-ford-nazi-photo_n_1707326.html?utm_hp_ref=canada" target="_hplink">Ford's office has explained Toronto's mayor was unaware of the man's beliefs when the image was captured</a>.
Rob Ford's ballet debut
Toronto Mayor Rob Ford (left) and city councillor Michelle Berardinetti (right) smile on stage during a performance of the Nutcracker in Toronto on Saturday, December 10, 2011. (THE CANADIAN PRESS/Pawel Dwulit)
Rob Ford's ballet debut
Toronto Mayor Rob Ford acts on stage dressed as a Cannon Doll during a performance of the Nutcracker in Toronto on Saturday, December 10, 2011. (THE CANADIAN PRESS/Pawel Dwulit)
Rob Ford's ballet debut
Toronto Mayor Rob Ford jumps on stage dressed as a Cannon Doll during a performance of the Nutcracker in Toronto on Saturday, December 10, 2011. (THE CANADIAN PRESS/Pawel Dwulit)