TORONTO - Toronto Mayor Rob Ford repeatedly denied any wrongdoing as he faced an Ontario judge Wednesday to defend himself against an allegation that could see him kicked out of office.

Ford is accused of not declaring a conflict of interest when he gave a speech and participated in a council vote last February to strike down a recommendation that he repay donations he solicited using official city letterhead for his private football foundation.

"I believe in my mind, in a conflict of interest, the city benefits and the councillor benefits," Ford told Justice Charles Hackland in a packed Toronto courtroom.

"It takes two parties to have a conflict. In this case, there was only one party. The city did not benefit."

During the hours-long testimony, Ford admitted that at the time, he didn't think he had violated any rules when he used his staff to help him stuff envelopes and address them to 11 potential donors.

But he added that the envelopes and stationary had been paid with his personal account.

"I believe I didn't do anything wrong," said Ford.

But the city's integrity commissioner, Janet Leiper, had found Ford's actions broke the conduct code for councillors.

She recommended Ford pay back $3,150 to the donors, many of whom were lobbyists who often did business with the city.

Council adopted the commissioner's findings and sanction in a resolution Ford voted against — but he never made the repayments, despite several reminders from the commissioner.

Under cross-examination, Ford said he doesn't remember receiving or reading a handbook for municipal councillors that outlines when to declare conflict of interest or the Municipal Conflict of Interest Act, which he is accused of breaking.

He also admitted he didn't attend an orientation meeting when he was first elected city councillor in 2000.

Just before the council vote in February, Ford gave a passionate speech about his charity, which buys football equipment for at-risk high school students in Toronto.

The mayor told the court he found that meeting "confusing," adding that the city solicitor or the city clerk usually would have pointed out when a motion was a conflict of interest for a councillor.

This was not done at the meeting, said Ford, and if it had been, he would have excused himself from the vote.

Ford testified that following the commissioner's decision, he sent letters to the 11 donors offering to pay their money back.

Some had refused the reimbursement, while others did not respond, he said.

"Why would I have to pay it out personally?" he retorted during cross-examination.

"I didn't touch the (foundation) money. I never touched the money."

Paul Magder, a Toronto resident, launched the lawsuit last March.

If found guilty, Ford could be ousted from office and barred from running for city council for seven years.

However, there's a chance Ford could hold on to his seat even if found to be at fault, provided the judge finds that Ford made a mistake or experienced a lapse in judgment.

Lawyer Clayton Ruby, whose client filed the lawsuit, told the court that Ford's actions were not made "honestly and (in) good faith."

"The issue is the integrity of what Rob Ford did," said Ruby.

The case is not about the merit of the football charity or the good it has done for at-risk children, but whether this was one of Ford's many "acts of persistence and ultimately successful defiance," he said.

At one point, he asked Ford if he was embarrassed by how often he was criticized.

"I'm not embarrassed about my job or what I do," replied Ford.

The mayor's lawyer, Alan Lenczner, argued that the case is about a single issue and not an "inquiry" into Ford's political career.

Lenczner told the court the integrity commissioner's original sanction is void because ordering Ford to repay the donations was out of her jurisdiction.

Trevor Farrow, a legal ethics expert at York University's Osgoode Hall Law School in Toronto, said the conflict-of-interest rules were designed to allow for human mistakes while "setting a fairly high standard to protect an important institution, which is our municipal government structure."

"It'll be key what evidence is given at that hearing in terms of what the mayor knew or should have known, in terms of this notion of inadvertence, ignorance or an error in judgment," he said.

When someone is found to have knowingly breached the spirit and letter of the rules, "the act does not give a lot of discretion to the court in terms of remedies," Farrow said.

"Will (Ford) lose his seat? I really don't know ... Is it a possibility? Yes, it's a possibility," he said.

The hearing continues Thursday.

Related on HuffPost:

Loading Slideshow...
  • The following is a rundown of key facts and background information pertaining to the Rob Court conflict of interest case. <em>With files from CBC</em>

  • What's At Stake

    Technically, the mayoralty. If Ford is found to have violated the Municipal Conflict of Interest Act (MCIA), he would be automatically ejected from office. Justice Charles Hackland, who will oversee the hearing, can also bar him from being able to run for office for up to seven years.

  • What Happened

    The legal challenge was launched on March 9 by Magder. His complaint stems from the mayor's decision to speak and participate in a council vote on Feb. 7 that rescinded an August 2010 directive from council and integrity commissioner Janet Leiper to pay back $3,150 in donations that corporate and lobbyist donors had given to Ford's football foundation when he was a city councillor. Ford was ordered to pay back the money out of his own pocket after Leiper investigated a complaint he had used council letterhead in March 2010 to solicit donations for the Rob Ford Football Foundation. Leiper found that year he had violatedcouncil's code of conduct in doing so, notably the sections that dealt with soliciting donations from lobbyists, a member of council using his or her influence to obtain donations and the rules for using city property and services to obtain donations for a charity set up in his name.

  • What The Complainant Alleges

    Ruby has said that Ford had a pecuniary interest in the matter when he voted in favour of rescinding council's 2010 decision that he pay back the money and take no further action on the matter. That would be a violation of the act, Ruby has said, which would result in his removal for office. The only way Ford can survive being ejected from office, Ruby says, is if he can show he acted inadvertently or through an error in judgment. But the legal challenge says neither of these two defences hold water and that the mayor's conduct was "flagrant and deliberate." <em>Clayton Ruby, with his client, Paul Magder, left, give details for a civil lawsuit against Toronto Mayor Rob Ford during a media briefing in the Press Gallery at City Hall on March 12, 2012.</em>

  • What The Mayor's Camp Says

    The mayor's office says in an email the MCIA does not apply because the integrity commissioner's original report addressed a council code of conduct violation, not an MCIA violation. Additionally, the August 2010 council vote that the mayor pay back the money was illegal, because council only has the authority to withhold pay or reprimand a member, not fine them. The order to pay back the $3,150 in donations constitutes a fine because Ford was asked to pay out of his own pocket, says the mayor's office. Further, his camp says, he never received the donations, only his charity did. Ford's lawyer could also argue he made an error in judgment.

  • What Happens If Ford's Found To Have Violated Law

    John Mascarin, a municipal and land use planning specialist at law firm Aird and Berlis LLP, calls the complaint a "very serious case." Justice Hackland cannot find the mayor to be in violation of the act but still be able to keep him from being turfed from office, said Mascarin. "The mayor of Toronto should know better," he said. A decision in the case will likely take one to two months, Mascarin expects. If Ford is forced from office, Toronto council then has 60 days to either appoint a mayor or hold a byelection for the office of the mayor. Ford can appeal a guilty finding to a three-judge panel at the Ontario divisional court. That panel's decision is final. The appeal process could take six to eight months, Mascarin estimates.

Loading Slideshow...
  • Toronto Rob Ford, right, gestures to Councillor Paul Ainslee in the council chamber as councillors look to pass motions to limit his powers in Toronto on Monday, Nov. 18, 2013. Blasting what he called a "coup d'etat," Ford said voters should be able to pass judgment on him, not his fellow councillors.

  • Toronto Mayor Rob Ford (centre) dances with participants ahead of the Toronto Caribbean Carnival in Toronto on Saturday July 30, 2011.

  • Toronto City Mayor Rob Ford, left, celebrates after defeating wrestler Hulk Hogan in an arm-wrestling match to promote Fan Expo in Toronto on Friday, Aug. 23, 2013 .

  • Twenty-two month-old Micah MacMilan reacts as he is picked up by Toronto Mayor Rob Ford while Ford was signing bobblehead dolls in his likeness at City Hall in Toronto on Tuesday November 12, 2013.

  • Toronto Mayor Rob Ford holds up a replica Grey Cup as he attends the Toronto Argonauts and Hamilton Tiger-Cats CFL Eastern Conference final football game in Toronto on Sunday, Nov. 17, 2013.

  • Toronto Mayor Rob Ford laughs with fans as he attends the Toronto Argonauts and Hamilton Tiger-Cats CFL Eastern Conference final football game in Toronto on Sunday, Nov. 17, 2013. Ford showed up at Sunday's Canadian Football League playoff game, despite a request by the league's commissioner that he stay away.

  • Canadian recording artist Drake, left, and Toronto Mayor Rob Ford laugh at a news conference announcing that Toronto will host the 2016 NBA All-Star game, in Toronto, Monday, Sept. 30, 2013.

  • Toronto Mayor Rob Ford displays a milk moustache as he takes part in voting with city council members in Toronto on Thursday, Nov. 14, 2013.

  • Toronto Mayor Rob Ford watches from the sidelines near the Argos bench during a CFL football game between the Toronto Argonauts and Calgary Stampeders in Calgary on Saturday, August 18, 2012.

  • Toronto Mayor Rob Ford poses for photographs inside a giant shark mouth while attending the grand opening of the Ripley's Aquarium of Canada in Toronto on Wednesday, Oct. 16, 2013. After two years of construction, delays and (Canadian) $130 million in costs, Ripley's Aquarium of Canada opened to the public Wednesday.

  • City of Toronto Mayor Rob Ford poses for a photo opportunity with other dignitaries in a shark's jaws at the opening of Ripley's Aquarium of Canada in Toronto on Wednesday, October 16, 2013.

  • Toronto Mayor Rob Ford is hoisted into the air by his Don Bosco Eagles team after winning the Metro Bowl quarter-final at Birchmount Park in Toronto, Thursday Nov. 15, 2012. A civil trial hearing in which the mayor is accused of libel against a restaurant owner went on without him.

  • Toronto Mayor Rob Ford (center) smiles as he officially opens the refurbished Sunnydale rink with Toronto Maple Leafs' coach Ron Wilson (right) and other dignitaries who were on hand as well as the Toronto Maple Leafs who practiced on the outdoor rink in Toronto on Wednesday, January 4, 2012.

  • Toronto Mayor Rob Ford grabs the Grey Cup by the handles during a parade celebrating the Toronto Argonauts victory in the Grey Cup final in Toronto on Tuesday November 27, 2012 .

  • Rob Ford Meets Butter Rob Ford

    <a href="" 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="" target="_hplink">butter sculpture of Toronto's mayor</a>.

  • 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 stands at the door to his office as he waits for an elevator in Toronto on Thursday November 14, 2013.

  • Mayor Rob Ford speaks at city council in Toronto on Wednesday, Nov. 13, 2013.

  • Nov. 13 2013. Toronto mayor Rob Ford during the afternoon session as councillors continued to debate a motion asking mayor Rob Ford to apologize to Torontonians for misleading therm about his use of crack cocaine.

  • 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.

  • In this Tuesday, Nov. 12, 2013 file photo, Toronto Mayor Rob Ford holds a bobblehead doll depicting him at Toronto City Hall. An electoral map of the 2010 mayoral election shows that Ford's voter base resides mainly in a more conservative constituency than the downtown electorate.

  • 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)

  • 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)

  • 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)

  • City of Toronto Mayor Rob Ford addresses the media outside office in Toronto on Thursday, Nov. 7, 2013, after the release of a video. A new video surfaced showing Ford in a rage, using threatening words including "kill" and "murder."

  • Toronto Mayor Rob Ford emerges from his office holding slices of a birthday cake to offer to members of the media at city hall in Toronto on Tuesday May 28, 2013.

  • Toronto Mayor Rob Ford arrives at City Hall in Toronto amid allegations of crack cocaine use on Friday May 17, 2013, in Toronto. Published reports say a video appears to show Ford smoking crack cocaine. Ford called the allegations ridiculous.

  • 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 Mayor Rob Ford carries the Pan American games flag in Omnilife Stadium during the closing ceremonies of the 2011 Pan American Games in Guadalajara, Mexico on Sunday, Oct. 30, 2011. Toronto will host the games in 2015.

  • 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 talks to a staff member at city hall in Toronto on Wednesday November 6, 2013.THE CANADIAN PRESS/Chris Young

  • Toronto Mayor Rob Ford addresses reporters at City Hall in Toronto on Tuesday November 27, 2012.

  • Toronto Mayor Rob Ford briefly takes the stage to greet the crowd as part of the New Years Eve celebrations at Nathan Phillips Square in Toronto on Monday, December 31, 2012.

  • 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.

  • <a href="">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>.

  • 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-elect Rob Ford, centre, raises his arms with his wife Renata, right, and mother Diane, left, as he speaks to supporters in Toronto on Monday, October 25, 2010.

  • 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.

  • Dave Chappelle And Rob Ford

    <a href="" target="_hplink">Comedian Dave Chappelle met briefly with Toronto Mayor Rob Ford</a> on Wednesday, Aug. 22, 2012

  • <a href="" target="_hplink">Rob Ford is seen reading while driving</a> in this photo from Twitter.

  • <a href="" target="_hplink">Rob Ford meets with comedic actors Will Ferrell and Zach Galifianakis</a>.