President Barack Obama sharply challenged Mitt Romney on foreign policy in their final campaign debate Monday night, accusing him of "wrong and reckless leadership that is all over the map." The Republican coolly responded, "Attacking me is not an agenda" for dealing with a dangerous world.

With just 15 days remaining in an impossibly close race for the White House, Romney took the offensive, too. When Obama said the U.S. and its allies have imposed crippling sanctions on Iran to halt nuclear weapons development, the Republican challenger responded that the U.S. should have done more. He declared repeatedly, "We're four years closer to a nuclear Iran."

Though their third and last face-to-face debate was focused on foreign affairs, both men reprised their campaign-long disagreements over the U.S. economy — the top issue by far in opinion polls — as well as energy, education and other domestic issues.

The two men did find accord on more than one occasion when it came to foreign policy.

Each stressed unequivocal support for Israel when asked about a U.S. response if the Jewish state were attacked by Iran.

"If Israel is attacked, we have their back," said Romney — moments after Obama vowed, "I will stand with Israel if Israel is attacked."

Both also said they oppose direct U.S. military involvement in the efforts to topple Syrian President Bashir Assad.

The debate produced none of the finger-pointing and little of the interrupting that marked the presidential rivals' debate last week, when Obama needed a comeback after a listless performance in their first meeting on Oct. 3.

Back to campaigning

The final debate behind them, both men are embarking on a home-stretch whirlwind of campaigning. The president is slated to speak in six states during a two-day trip that begins Wednesday and includes a night aboard Air force One as it flies from Las Vegas to Tampa. Romney intends to visit two or three states a day.

Already four million ballots have been cast in early voting in more than two dozen states.

Obama appears on course to win states and the District of Columbia that account for 237 of the 270 electoral votes needed for victory. The same is true for Romney in states with 191 electoral votes. The battlegrounds account for the remaining 110 electoral votes: Florida (29), North Carolina (15), Virginia (13), New Hampshire (4), Iowa (6), Colorado (9), Nevada (6), Ohio (18) and Wisconsin (10).

Libya, Iran and more Middle East tensions

On Monday night, Obama said more than once that Romney had been "all over the map" with his positions. And not necessarily putting new distance between the two men. In fact, Romney offered rare praise for the administration's war efforts in Afghanistan.

The former Massachusetts governor said the 2010 surge of 33,000 U.S. troops was a success and asserted that efforts to train Afghan security forces are on track to enable the U.S. and its allies to put the Afghans fully in charge of security by the end of 2014. He said that U.S. forces should complete their withdrawal on that schedule; previously he has criticized the setting of a specific withdrawal date.

When it came to Iran, Romney stressed that war is a last option to prevent Tehran from developing a nuclear weapon, softening the hawkish tone that had been a hallmark of his campaign.

And Romney barely addressed the simmering dispute over the administration's handling of the attack on the U.S. Consulate in Benghazi, Libya, that killed the U.S. ambassador and three other Americans.

But the debate was hardly all sweetness and light.

On the Middle East, Romney said that despite early hopes, the ouster of despotic regimes in Egypt, Libya and elsewhere over the past year has resulted in a "rising tide of chaos." He said the president has failed to come up with a coherent policy to grapple with change sweeping the region, and he added ominously that an al-Qaida-like group has taken over northern Mali.

Anticipating one of Obama's most frequent campaign assertions, Romney said of the man seated nearby, "I congratulate him on taking out Osama bin Laden and taking on the leadership of al-Qaida. But we can't kill our way out of this mess. ... We must have a comprehensive and robust strategy."

The president said he had ended the war in Iraq, was on a path to end the U.S. combat role in Afghanistan and has vowed to bring justice to the Benghazi attackers.

He also jabbed at Romney's having said during the campaign that Russia is the United States' No. 1 geopolitical foe.

"Governor, when it comes to our foreign policy you seem to want the policies of the 1980s, just like you want to import the social policies of the 1950s and the economic policies in the 1920s," Obama said.

Obama took a mocking tone after Romney, criticizing the administration's Pentagon budget, said disapprovingly the U.S. Navy has fewer ships than at any time since the end of World War I.

"I think Governor Romney maybe hasn't spent enough time looking at how our military works. You mentioned the Navy, for example, 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 has changed. We have these things called aircraft carriers where planes land on them."

Whatever the outcome of the final face-to-face confrontation, the debates have left an imprint on the race. Romney was widely judged the winner of the first debate over a listless president on Oct. 3, and he has risen in polls in the days since. Obama was much more energetic in the second.

Monday night marked the third time in less than a week that the president and his challenger shared a stage, following the feisty 90-minute town-hall-style meeting last Tuesday on Long Island and a white-tie charity dinner two nights later where gracious compliments flowed and barbs dipped in humor flew.