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