"When I see the casualness with which some of these folks talk about war, I'm reminded of the costs involved in war. I'm reminded of the decision that I have to make, in terms of sending our young men and women into battle, and the impact that has on their lives, the impact it has on our national security, the impact it has on our economy," Obama said. "This is not a game. And there's nothing casual about it."
Meanwhile, the United States, the European Union, China and Russia agreed to resume long-stalled talks with Iran on its disputed nuclear program, potentially reviving the quest for a diplomatic settlement and easing fears of a military confrontation, the EU and the United States announced Tuesday.
Iran appeared to reciprocate, dropping a refusal to allow U.N. International Atomic Energy Agency inspectors into a military complex suspected of being involved in what the United States, the EU, Israel and other powers contend is a secret nuclear weapons program. Iran says its program is for peaceful uses.
The decision to resume talks with Iran is a political gamble for Obama, who was hammered Tuesday as being too soft on the Islamic republic by the Republican candidates vying to challenge him in the November election.
A collapse of new talks also could increase the likelihood that Israel - which views Iran's program as an existential threat - could unilaterally attack Iranian nuclear facilities. Israeli Prime Minister Benjamin Netanyahu repeatedly asserted that right during a two-day visit to Washington that ended Tuesday.
Obama's remarks about the Republican candidates came hours after Rick Santorum, Mitt Romney and Newt Gingrich accused Obama of being weak on Iran in speeches before an influential pro-Israel lobby, the American Israel Public Affairs Committee. Santorum called for giving Iran a "clear ultimatum" to prevent it from obtaining nuclear weapons, and Romney said he would end the "current policy of procrastination."
Without naming his rivals, Obama challenged them, saying that he had heard "a lot of bluster and a lot of big talk," but that when it comes down to action, "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," Obama said, adding: "If some of these folks think that it's time to launch a war, they should say so. And they should explain to the American people exactly why."
Hours earlier, speaking to AIPAC, Santorum called for doing "more than just talk."
"We need to say the time is now. You will stop your nuclear production now," he said. "If they do not tear down those facilities, we will tear down them ourselves. This is not bellicosity and war mongering; this is preventing the most radical regime in the world from having a weapon."
Obama addressed AIPAC on Sunday and said he opposes Iran's securing a nuclear weapon and would not "hesitate to use force when necessary."
But Tuesday he defended his administration's emphasis first on sanctions and diplomacy, saying that when he took office, Iran was "on the move" and had made progress on its nuclear program.
Now, he said, Iran is politically isolated and is "feeling the bite" of "crippling sanctions" that are expected to tighten over the summer as they hit Iran's central bank and oil industry.
"At this stage, it is my belief that we have a window of opportunity where this can still be resolved diplomatically," he said, adding that "top Israeli intelligence officials" agreed with his assessment.
"This notion that somehow we have a choice to make in the next week or two weeks or month or two months is not borne out by the facts," he said.
He said his administration would continue to press Iran "even as we provide a door for the Iranian regime to walk through."
As for candidates on the campaign trail, he said: "Those folks don't have a lot of responsibilities. They're not commander in chief."
He also fielded domestic concerns, dismissing with a laugh Republican charges that he wants higher gasoline prices to promote renewable energy and reduce drilling.
"Just from a political perspective, do you think the president of the United States going into re-election wants gas prices to go up higher?" he said, looking around the room.
He said his administration continues to look at measures to bring down gas prices, including looking at bottlenecks in refineries nationwide.
Though he didn't mention his Republican rivals by name, he acknowledged his timing as he took to the lectern at the White House.
"Now, I understand there are some political contests going on tonight," he said. "But I thought I'd start the day off by taking a few questions."
Asked what he would say to Romney, whom a reporter noted has called Obama the "most feckless president since Carter," Obama laughed and replied, "Good luck tonight."