The final debate between Democrat Barack Obama and Republican John McCain Wednesday night quickly delved deep into the political mudslinging of the campaign trail.

The debate, held at Hofstra University in Hempstead, N.Y., was slated to focus entirely on the economy and domestic policy.

But within 20 minutes the debate quickly became tense as the topic shifted to negative ads and smears.

McCain, sitting only a metre away from his opponent, went after Obama's loose association with 1960s radical William Ayers, a founder of the violent antiwar group Weather Underground.

Obama responded: "Let's deal with this. Forty years ago, when I was eight, Ayers did some despicable things. Ten years ago I served on a school board with him ... and some other prominent republicans. He's not involved in my campaign, and he won't advise my White House."

In a national poll conducted by CNN immediately after the debate, 58 per cent of viewers felt Obama had come out on top, while 31 per cent felt McCain won.

Aside from Ayers, McCain demanded to know the extent of Obama's relationship with ACORN, a liberal group accused of violating federal laws to register voters. Obama replied he had no relationship with the group.

McCain also asked Obama to apologize for the remarks of Georgia Democrat John Lewis, who said that McCain's campaign was "sowing the seeds of hate" and made reference to segregationist Alabama Gov. George Wallace.

"That to me was so hurtful," said McCain.

Obama replied that his campaign and Lewis had already said that the comparison to Wallace went too far. But he then said McCain's campaign wasn't doing enough when dealing with supporters who have cried "terrorist" or "kill him" when Obama's name was mentioned at rallies.

"The fact is, it has taken many turns which I think are unacceptable," Obama said. "I think Congressman Lewis' point was that we have to be careful about how we deal with our supporters."

Obama specifically pointed out that McCain's running mate, Alaskan Gov. Sarah Palin, did nothing after hearing such statements at her campaign stops.

Some high-profile Republican's have said their candidate's strategy was divisive and dangerous in response to some of the incidents at the Palin rallies.

Obama also said McCain's campaign was all about Ayers, and completely negative, rather than being about real issues affecting Americans.

"One hundred percent, John, of your ads -- 100 percent of them -- have been negative," Obama said.

"That's not true," McCain retorted.

"It is true," Obama shot back.

According to a study by the University of Wisconsin-Madison, McCain's campaign is now focusing entirely on negative ads, but ran a number of positive ads earlier in the campaign.

McCain, behind in the polls, played the aggressor early and tried to distance himself from George W. Bush.

McCain said, "Sen. Obama, I am not President Bush. ... You wanted to run against President Bush, you should have run four years ago."

Obama tried to knock aside McCain's independence from the current president.

"If I've occasionally mistaken your policies for George Bush's policies, it's because on the core economic issues that matter to the American people -- on tax policy, on energy policy, on spending priorities -- you have been a vigorous supporter of President Bush," he said.

Canada also came up in the debate, when McCain criticized Obama's statements earlier in the campaign about re-negotiating the North American Free Trade Agreement.

Later McCain said Obama's policies would cause Canada to start selling its oil to China.

Throughout the debate, both candidates talked about "Joe the Plumber" constantly. Joe was someone Obama met on the campaign trail this week, who asked whether Obama's economic policies would hurt his business.

The economy

Moderator Bob Schieffer's first question was to ask each candidate to explain why his economic plan was better than his opponent's.

McCain went first, and said that $300 billion of the $750 billion Wall Street bailout should be used to buy up sub-prime mortgages.

"Americans are hurting right now and they're angry," McCain said.

"I am convinced that until we reverse this continued decline in home ownership, and put a floor under it, so that people not only have the hope and belief they can stay in their homes and realize their American dream, that (will not change)."

Obama responded that there needs to be more for the middle class, and that he wanted to provide tax credits for companies creating jobs in the U.S.

He also said he wants to cut taxes for those making less than $250,000.

McCain responded that Obama's tax plan would hurt small businesses and "the American dream."

The candidates also sparred over abortion, healthcare and education.

Obama and McCain were seated at a table with Schieffer of CBS, unlike previous debate formats.

Tonight's debate was considered make-or-break for McCain, who is behind in both national and swing state polling.