President George W Bush and his Democratic challenger John Kerry have clashed over domestic policy and security in their last TV debate.
It was the last time the men were scheduled to meet before the poll
The two men revealed sharp differences over taxes, jobs and health care but neither was seen as an outright winner.
Both made pointed attacks - Mr Kerry that Mr Bush had ruined the economy and health care, Mr Bush that Mr Kerry was dangerously out of the mainstream.
It was their last chance to address a mass audience before the November poll.
The candidates will now travel to battleground states for non-stop campaigning in the last three weeks of what polls suggest will be a very tight race for the White House.
The debate at Arizona State University was the last face-to-face meeting for Mr Bush and Mr Kerry before the 2 November election.
It was scheduled to address mainly domestic issues, which have been often overshadowed in the campaign by the conflict in Iraq and homeland security amid Mr Bush's war on terror.
Mr Kerry charged that five million Americans had lost health insurance coverage during Mr Bush's time in the White House, meaning many could not afford to be treated.
"The president has turned his back on the wellness of America, and there is no system and it's starting to fall apart," he said.
Mr Bush hit back with what has become his chief attack line of recent weeks, that Mr Kerry is a lifelong liberal who would raise taxes and government spending.
"There's a mainstream in American politics and you sit right on the far-left bank," he told his opponent.
In their clashes over the economy, Mr Kerry drew attention to the fact that Mr Bush is set to be the first president in 72 years to see a net job loss during his time in office.
Mr Bush retorted that he had had to deal with huge problems that were not of his making, and that he had done so successfully.
During the 90-minute debate, the two men also outlined their differences on gay marriage and abortion rights and addressed their different faiths.
They also returned to homeland security and the war on terror that have become the central themes of this year's campaign.
Mr Bush quoted a Kerry interview against the Democrat challenger. "My opponent just this weekend talked about how terrorism could be reduced to a 'nuisance', comparing it to prostitution, illegal gambling," he said.
"That attitude and that point of view is dangerous."
Mr Kerry rejected that argument and said he would wage a "smarter, more effective war on terror".
"This president, regrettably, rushed us into a war, made decisions about foreign policy, pushed alliances away and as a result, America is now bearing this extraordinary burden where we are not as safe as we ought to be," he said.
The BBC's Rob Watson in Arizona says both campaigns will be pleased with the performance of their candidates.
An instant poll taken by Gallup for CNN and USA Today after the debate found more viewers believing Mr Kerry had won the debate, while other surveys and commentators scored the contest as a draw.
Mr Bush has moved on to Nevada for campaign stops on Thursday before moving to another swing state, Oregon, while Mr Kerry was to address the American Association of Retired Persons, an influential group representing senior citizens.