The candidates began with a discussion on the changing Middle East and the new face of terrorism. Romney congratulated the president on taking out Osama bin Laden, but added, "We can't kill our way out of this mess. We're going to have to put in place a very comprehensive and robust strategy."
Romney stated that his strategy was to get the Muslim world to reject extremists on its own.
Mr. Obama addressed the attack on the U.S. consulate in Benghazi that killed Ambassador Christopher Stevens and three other Americans on Sept. 11.
"I immediately made sure that, number one, that we did everything we could to secure those Americans who were still in harm's way; number two, that we would investigate exactly what happened, and number three, most importantly, that we would go after those who killed Americans and we would bring them to justice," Mr. Obama said.
Mr. Obama took every opportunity to remind Mitt Romney and voters at home that he is the one with foreign policy experience.
"I think Gov. Romney maybe hasn't spent enough time looking at how our military works," the president said. "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. We have these things called aircraft carriers, where planes land on them. We have these ships that go underwater, nuclear submarines."
The president took a jab at Romney for referring to Russia as the top "geopolitical foe" of the U.S. in March.
"Gov. Romney, I'm glad that you recognize that al Qaeda is a threat, because a few months ago when you were asked what's the biggest geopolitical threat facing America, you said Russia, not al Qaeda," Mr. Obama said. "You know, the Cold War's been over for 20 years."
Romney accused the president of attacking him and not staying on topic, saying, "Attacking me is not talking about how we're going to deal with the challenges that exist in the Middle East."
Romney said Mr. Obama went on an "apology tour," going to the Middle East and criticizing America. The idea of an "apology tour" has been a recurring attack for conservatives for a long time and has its roots in travel the president undertook in 2009.
Mr. Obama never formally regretted American policy during his overseas speeches. He drew distinctions between his policies and those of President George W. Bush, and took a tone of reciprocal blame at times for diplomatic ties that may have been strained, but he never apologized for American diplomacy.
"Nothing Gov. Romney just said is true, starting with this notion of me apologizing. This has been probably the biggest whopper that's been told during the course of this campaign," Mr. Obama fired back.
Part of Romney's strategy was to turn the debate back to the economy and make the point you can't be strong abroad if you're not strong at home.
"American must lead, and for that to happen, we have to strengthen our economy here at home. You can't have 23 million people struggling to find a job," Romney said.
The 90-minute showdown was held at Lynn University in Boca Raton, Fla., one of the key battleground states. The debate was moderated by Bob Schieffer of CBS News.
In an exclusive Eyewitness News poll conducted by SurveyUSA, 58 percent of Californians say President Obama was the clear winner of the debate, while 35 percent say Mitt Romney won. Seven percent say there was no clear winner.
The Associated Press and ABC News contributed to this report.