Below are some highlights of what the two candidates said.
On the US military:
Romney: "Our military is second to none in the world. We're blessed with terrific soldiers, and extraordinary technology and intelligence. But the idea of a trillion dollars in cuts through sequestration and budget cuts to the military would change that."
Obama: "I think (the) governor maybe hasn't spent enough time looking at how our military works. You mention the Navy, for example, and that we have fewer ships than we had in 1916. Well Governor, we also have also fewer horses and bayonets. Because the nature of the military has changed... The question is not a game of battleship or counting ships, it's what are our capabilities."
On America's role in the world:
Romney: "Our purpose is to make sure the world is peaceful. We want a peaceful planet, we want people to enjoy their lives and know they're going to have a bright and prosperous future and not be at war. That's our purpose. And the mantle of leadership for the promoting the principles of peace has fallen to America. We didn't ask for it, but it's an honour we have it.
"But for us to be able to promote those principles of peace requires us to be strong. And that begins with a strong economy at home and unfortunately the economy is not stronger."
Obama: "The world needs a stronger America and it is stronger than when I came into office. Because we ended the war in Iraq, we were able to refocus our attention on not only the terrorism threat but also beginning a transition process in Afghanistan. It also allowed us to refocus on alliances and relationships that have been neglected for a decade.
"And Governor Romney, our alliances have never been stronger, in Asia, in Europe, in Africa, with Israel, where we have an unprecedented military and intelligence cooperation, including dealing with the Iranian threat.
"But what we also have been able to do is position ourselves so that we can start rebuilding America. And that's what my plan does."
On the Middle East:
Romney: "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 to help the world of Islam and other parts of the world to reject this radical violent extremism."
"The key that we're going to have to pursue as a pathway is to get the Muslim world to be able reject extremism on its own."
Obama: "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."
"What we need to do with respect to the Middle East is strong and steady leadership, not wrong and reckless leadership that is all over the map, and unfortunately that's the kind of opinions that you've offered throughout the campaign and it is not a recipe for American strength."
Romney: "Attacking me is not an agenda. Attacking me is not talking about how we're going to deal with the challenges that exist in the Middle East, and take advantage of the opportunity there, and stem the tide of this violence."
Obama: "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. You said we should have gone into Iraq, despite that fact that there were no weapons of mass destruction."
Romney: "I don't want our military involved in Syria. I don't think there's a necessity to put the military there at this stage, I don't anticipate that in the future."
Obama: "Governor Romney said he doesn't have different ideas and that's because we're doing exactly what we should be doing, which is try to promote a moderate Syrian leadership and an effective transition so that we get (Syrian President Bashar al-) Assad out. That's the kind of leadership we've shown and that's the kind of leadership we'll continue to show."
Obama: "China is both an adversary but also a potential partner in the international community if it's following the rules. So my attitude coming into office was that we're going to insist that China plays by the same rules as everybody else."
Romney: "China has an interest that's very much like ours, in one respect, and that is they want a stable world, they don't want war, they don't want to see protectionism, they don't want to see the world break out into various forms of chaos. ...
"We can be a partner with China. We don't have to be an adversary in any way shape or form, we can work with them, we can collaborate with them if they're willing to be responsible."
Romney: "Russia does continue to battle us in the U.N. time and time again. I have clear eyes on this. I'm not going to wear rose-colored glasses when it comes to Russia, or Mr. (Russian President Vladimir) Putin. And I'm certainly not going to say to him, I'll give you more flexibility after the election. After the election, he'll get more backbone."
Obama: "A few months ago when you were asked what's the biggest geopolitical threat facing America, you said Russia. Not al Qaeda. You said Russia. And the 1980s, they're now calling to ask for their foreign policy back because, you know, the Cold War's been over for 20 years."