Mitt Romney came in peace. He said he wanted better education, more financial aid, gender equality and rule of law, and he was talking about the Middle East, not the Midwest. He even said he was consulting a group of "Arab scholars" sponsored by, of all things, the United Nations, to shape his plan for fixing the troubled region. "We can't kill our way out of this mess," he said.

And all his expressions of internationalism and support for women's liberation overseas made President Obama, by contrast, almost sound like a Republican hard-liner.

"Well, my first job as commander in chief, Bob, is to keep the American people safe," President Obama told the evening's moderator, Bob Schieffer.

Monday night's debate provided an odd role reversal that made Mr. Romney seem on the defensive, particularly because he at times stuttered and sputtered in his haste to make his points. He pronounced foreign names and countries correctly, but also carefully, worried perhaps that a mispronunciation would sink his credibility. Usually, it is Mr. Obama who seems professorial and long-winded. There were long moments when Mr. Romney made the president sound succinct and sharp-edged.

Perhaps trying to demonstrate the breadth of his knowledge, Mr. Romney careened from Iran to Poland to China to Latin America to Greece to balanced budgets. He delivered a long lecture on the strategic importance of Pakistan that was the same as Mr. Obama's position, then later complained, in detail, about spending cuts to the Navy.

"Well, Governor, we also have fewer horses and bayonets," Mr. Obama said, eliciting a laugh from the audience that echoed on Twitter, "because the nature of our military's changed. We have these things called aircraft carriers, where planes land on them. We have these ships that go underwater, nuclear submarines."