Washington (CNN) -- Republican presidential hopefuls and President Barack Obama traded barbs Tuesday over policy toward Iran.
In speeches before a powerful pro-Israel lobby group, Republican candidates promised a stronger line against Iran and a closer relationship with Israel if elected.
Three of the four candidates in the GOP primary spoke separately at the annual policy conference of the American Israel Public Affairs Committee (AIPAC).
Rick Santorum and Mitt Romney used the exact same phrase: If they were president, there would be "no gap" between the United States and Israel.
"As president, I'll treat our allies and friends like friends and allies," Romney said, via satellite.
Both candidates also said they see Iran's threat as much bigger than just against Israel.
"A nuclear Iran is not only a problem for Israel. It is a problem for America, and a problem for the world," Romney said.
Santorum, who appeared in person, said that with nuclear weapons, Iran would be "an existential threat to freedom-loving people around the world, which Iran is."
In remarks Tuesday, Obama shot back, characterizing his potential opponents' as "beating the drums of war."
"Now, what's said on the campaign trail -- you know, those folks don't have a lot of responsibilities. They're not commander in chief," he said. "And when I see the casualness with which some of these folks talk about war, I'm reminded of the costs involved in war."
Candidate Newt Gingrich also expressed a harder line, though not as forcefully as his opponents.
Under his watch, the United States would do anything to undermine and replace the Iranian regime short of war, he said.
Santorum described the latest news on Iran -- that the United States and other countries have offered to resume negotiations with Tehran over its nuclear program -- as appeasement. Such steps are delays that lead Iran to not take the United States seriously, he said.
To that effect, Gingrich said, "We would not keep talking while the Iranians keep building."
Romney also said that there is no room for negotiation with Iran.
"We do not have common interests with a terrorist regime," he said.
"What I have said is that we have a window through which we can resolve this issue peacefully, we have put forward an international framework that is applying unprecedented pressure," Obama said. "The Iranians have just stated that they are willing to return to the negotiating table and we have got the opportunity, even as we maintain that pressure, to see how it plays out."
Romney said that if he were elected, he would seek new sanctions against Iran and enforce current sanctions, including by putting "warships at Iran's door."
"I will bring the current policy of procrastination toward Iran to an end," he said.
Santorum also criticized the Obama administration's relations with Israel.
"From everything I've seen from the conduct of this administration, he has turned his back on the people of Israel," he said.
Gingrich took a wider view of the Middle East, beyond Iran.
He railed against the rise of fundamentalist Islamic militants, and accused the current administration of tiptoeing around the real threat to America.
"We need a fundamental reassessment of our understanding of the threat of radical Islam. We need an administration with the courage to use the words 'radical Islam,'" he said.
"We need to be clear that the teaching of hatred, the recruiting of martyrs, the anticipation that children will grow up to be killers, are not a pattern compatible with a peace process," Gingrich added.
Ron Paul was not scheduled to speak to the group.
During his own speech to AIPAC, Obama said that preventing Iran from developing a nuclear weapon is a national security interest of both Israel and the United States, and he pledged that all options -- including a military effort -- are on the table.
His Republican contenders jumped on the speech, saying that Obama's rhetoric does not match his actions.
Obama replied Tuesday, "And, you know, when I see some of these folks who have a lot of bluster and a lot of big talk but when you actually ask them specifically what they would do, it turns out they repeat the things that we've been doing over the last three years, it indicates to me that that's more about politics than actually trying to solve a difficult problem."