Two polls have found Barack Obama won the final debate against Mitt Romney, a clash that appeared to polish the US president's leadership credentials.
'I know you haven't been in a position to actually execute foreign policy, but every time you've offered an opinion, you've been wrong,' President Obama charged, fighting for his political life in the debate in swing-state Florida.
Obama had the best lines of the night and sharply cross-examined Romney on his approach to Syria, Iran and trade rows with China, accusing him of 'airbrushing history' by dumping earlier hawkish conservative positions.
Romney, often wresting the debate from foreign policy to the struggling domestic economy, landed his share of blows on creating jobs but differed more on tone than substance with Obama on national security.
The Republican, who has spent months savaging Obama as weak and an appeaser, actually backed much of the substance of the president's global strategy, courting wavering voters who hold the key to the November 6 election.
He endorsed Obama's decision to withdraw from Afghanistan in 2014, supported the president's lethal drone war against terror suspects and congratulated him for hunting down Osama bin Laden, in clear bid to moderate his image.
But he renewed charges that Obama's tone in international affairs was at fault, accusing him again of mounting 'apology tours' abroad, drawing a furious riposte from Obama that the charge was a 'whopper'.
Romney, 65, a multi-millionaire businessman, set out to avoid mistakes that could undermine his credibility as a potential commander-in-chief and appeared to avoid any disqualifying mistakes, leaving the election a toss-up.
An instant poll by CBS News found that Obama won the debate by 53 per cent to 23 per cent, after a clash that appeared to polish his leadership credentials and saw him showing the passion missing in his disastrous first debate.
CNN's poll found Obama beat Romney to 48 to 40 per cent.
But foreign policy is seen as unlikely to decide the election, with voters pre-occupied by the sluggish economy, and it will take several days to gauge whether the clash had any impact in the tied up polls.
Dotty Lynch, professor of Public Communication at American University said that by agreeing with Obama on foreign policy - the incumbent's strong suit - Romney had tried to manoeuvre his campaign onto more favourable ground.
'By agreeing on the big points of foreign policy, Romney played it safe tonight, and tried to move the conversation to the economy where he thinks he's stronger,' she said.
Obama looked bemused, puzzled and exasperated by Romney's tactics, staring intently at him as he spoke, apparently trying to keep frustration in check, as he nodded to debate moderator Bob Schieffer that he wanted a rebuttal.
'On a whole range of issues, whether it is in the Middle East, Afghanistan, whether it is in Iraq, whether it is in Iran, you have been all over the map,' he told his challenger as they sat side-by-side on a semi-circular table.
Obama, with wry humour, dismissed Romney's claims that he had run down the armed forces to levels not seen since early in the 20th Century.
'You mentioned the navy, for example, and that we have fewer ships than we did in 1916. Well, governor, we also have fewer horses and bayonets because the nature of our military's changed,' he said, to laughter from the audience.
'We have these things called aircraft carriers where planes land on them. We have these ships that go underwater, nuclear submarines.'
Romney, a former Massachusetts governor, warned Islamic extremism was rampant in post-Arab Spring societies and blamed a lack of US leadership over the last four years, and cautioned 'we can't kill our way out of this mess'.
Romney also called on Obama to do more to end violence in Syria and demanded tightened sanctions on Iran over its nuclear program.
'I thought they saw weakness where they had been expected to find American strength,' Romney said of leaders in Tehran.
Obama also launched a scathing attack on Romney's foreign tour as a candidate earlier this year, saying when he had been running for the White House he visited US troops and Israel to reflect on the Holocaust.
'I didn't take donors,' Obama charged, noting the fact Romney carried out a political fundraiser with wealthy Jewish supporters in Israel.
The president, who withdrew troops from Iraq, pointed to Romney's past statements in support of keeping a US military presence in the country invaded in 2003 under former Republican president George W. Bush.
And he mocked Romney's previous statement that Russia was America's top geopolitical foe.
'Governor, when it comes to our foreign policy, you seem to want to import the foreign policies of the 1980s, just like the social policies of the 1950s and the economic policies of the 1920s,' Obama said.
Romney offered a dismal assessment of the president's strategy, pointing to bloodshed in Syria and in Libya, where four Americans including the US ambassador were killed last month, and twice mentioning Al-Qaeda gains in Mali.
The rivals are neck-and-neck in national polls after Romney surged following his first debate win in early October and started chipping away at Obama's foundation in the swing states that will decide the election.
New polls released on Monday had the race a cliffhanger with two weeks to go.
CBS News and ABC News had Obama up by two and one points in the national race, but a Politico/GWU/Battleground poll showed Romney leading by two points.