(CNN) -- Sen. John McCain played offense against Sen. Barack Obama during much of the final presidential debate as he challenged his rival on his policies, judgment and character.
Obama said he is the candidate who can bring "fundamental change" to the country and continued to try to link McCain to President Bush.
In one of the more forceful moments of the debate, McCain turned to Obama and said, "I am not President Bush."
"If you want to run against President Bush, you should have run four years ago. I'm going to give a new direction to this economy and this country," the Arizona senator said. Watch McCain say he's no Bush »
McCain aides said they had been working on him to be more explicit in drawing a distinction between himself and Bush.
With less than three weeks before the election, it was one of several jabs McCain took at his opponent, who is leading the race in most national polls and has an 8-point lead in CNN's average of national polls.
The poll has a margin of error of plus or minus 4 percentage points, and the sample of debate-watchers in the poll were 40 percent Democratic and 30 percent Republican.
McCain touted what he called his "long record of reform" and said to Obama: "You have to tell me one time when you have stood up with the leaders of your party on one single major issue."
Obama said he has a "history of reaching across the aisle" and pointed to his support for charter schools, pay for performance for teachers and clean coal technology. See scenes from the debate »
"Sen. Obama, your argument for standing up to the leadership of your party isn't very convincing," McCain said.
The third and final presidential debate took place at Hofstra University in Hempstead, New York, and was moderated by Bob Schieffer of CBS News. Analysts weigh in on the debate »
As McCain tried to put the pressure on Obama, he told the Illinois senator that voters need to "know the full extent" of his relationship with Bill Ayers, a former 1960s radical who belonged to the Weather Underground.
"Mr. Ayers is not involved in this campaign, he has never been involved in my campaign, and he will not advise me in the White House," Obama said.
McCain's campaign has charged that Obama's association with Ayers should cause voters to question his judgment.
Ayers was a founding member of the radical Weather Underground, a group that was involved in bombings in the early 1970s, including attacks on the Pentagon and the Capitol.
Obama said Ayers had committed "despicable acts" 40 years ago, but pointed out that he himself had been 8 years old at the time. Watch what Obama says about Ayers »
Obama said Ayers has become the "centerpiece" of McCain's campaign and said the fact that McCain keeps bringing Ayers up "says more about your campaign than it says about me."
The Republican nominee also brought up comments made last weekend by Rep. John Lewis and pushed Obama to repudiate them.
Lewis on Saturday compared the feeling at recent GOP rallies to those of segregationist George Wallace.
"I think Congressman Lewis' point was that we have to be careful about how we deal with our supporters," Obama said.
"I do think that he inappropriately drew a comparison between what was happening there and what had happened during the civil rights movement, and we immediately put out a statement saying that we don't think that comparison is appropriate," he said.
As the candidates butted heads over tax policy, both made frequent mention of "Joe the plumber." Watch voters react when 'Joe' comes up »
Last weekend, while Obama was canvassing for support in Holland, Ohio, the Democratic nominee ran into a man since dubbed Joe the plumber.
In that exchange "Joe" asked Obama if he believed in the American Dream -- he said he was about to buy a company that makes more than $250,000 a year and was concerned that Obama would tax him more because of it.
Obama explained his tax plan in depth, saying it's better to lower taxes for Americans who make less money, so that they could afford to buy from his business.
At the debate Wednesday, McCain characterized Obama's plan as trying to "spread the wealth around." Watch the candidates debate tax plans »
"We're going to take Joe's money, give it to Sen. Obama, and let him spread the wealth around. I want Joe the plumber to spread the wealth around," McCain said.
He added, "Why would you want to increase anybody's taxes right now? Why would you want to do that to anyone, anyone in America, when we have such a tough time?"
Obama countered that both he and McCain want to cut taxes, but that his plan would cut taxes for "95 percent of American families," more than McCain's plan.
On spending, Obama promised as president he would "go through the federal budget page by page, line by line, and cut programs that don't work," echoing a vow his rival has made repeatedly.
McCain in turn promised an "across the board spending freeze." He said he would balance the federal budget in four years, and went on to name specific programs including subsidies for ethanol when Schieffer pressed both candidates to identify specific budget cuts they would make.
The candidates also talked about abortion rights, a topic not addressed in the previous presidential debate. Watch the candidates debate abortion »
McCain refused to commit to nominating only judges who opposed abortion, saying he would "never impose a litmus test" on court nominees.
But he qualified the statement a moment later, saying he would base his nominations on "qualifications" -- and that he did not believe a judge who supported Roe v. Wade, the case that legalized abortion, "would be part of those qualifications."
McCain hammered Obama on abortion, accusing him of "aligning himself with the extreme aspect of the pro-abortion movement in America."
Obama rejected the charge out of hand, saying: "Nobody is pro-abortion."
He advocated sex education as a way of reducing the number of unintended pregnancies that result in abortions.
"We should try to prevent unintended pregnancies by providing appropriate education to our youth, communicating that sexuality is sacred and they should not be engaged in cavalier activity," he said.
At the conclusion of the debate, Schieffer signed off with a line borrowed from his mother:
"Go vote now. It will make you feel big and strong."