WASHINGTON — President Barack Obama said Sunday he would not hesitate to attack Iran to keep it from getting a nuclear bomb, hoping a forceful assurance will discourage Israel from launching a unilateral strike that could ignite the Middle East and drag the US into war.
Pleading for time for diplomacy to work, Obama warned that ‘‘loose talk of war’’ was only undermining world security.
Addressing a powerful pro-Israel lobby, Obama delivered messages to multiple political audiences: Israel, Iran, Jewish voters, a restless Congress, a wary international community and three Republican presidential contenders who will speak to the same group Tuesday.
At the core was his bullish assertion that the United States will never settle for containing a nuclear-armed Iran or fail to defend Israel.
‘‘I will not hesitate to use force when it is necessary to defend the United States and its interests,’’ Obama said.
But he framed military force as a last resort, not the next option at a time when sanctions are squeezing Iran. The president seemed intent on quieting a drumbeat for war, saying even the talk of it has driven up the price of oil to the benefit of Iran.
‘‘Now is not the time for bluster,’’ Obama said. ‘‘Now is the time to let our increased pressure sink in.’’
Obama’s speech to the American Israel Public Affairs Committee set a tone for a vital meeting Monday with Prime Minister Benjamin Netanyahu, whose embattled Mideast nation fears it will soon lose a window to strike Iran before it becomes a target of nuclear weapons.
More than once, Obama threatened force but made clear his preference was peace through pressure.
Netanyahu, standing his ground against what his country perceives as a threat to its existence, said he perhaps most appreciated hearing Obama say ‘‘Israel must be able to defend itself, by itself, against any threat.’’ Speaking to reporters in Canada ahead of his arrival in the US, Netanyahu made no reference to the sanctions and diplomacy Obama emphasized.
Iran insists its nuclear program is for peaceful purposes, and escalating sanctions have not deterred its pursuit. It has rapidly ramped up production of the higher-grade enriched uranium needed for an atomic bomb.
Obama offered the lines Israel wanted to hear, framing the Iranian threat as a problem for the entire world, and asserting Israel’s right to defend itself how it sees fit.
No assurance was more important than when Obama said he has does not have a ‘‘policy of containment’’ about Iran, but rather one to deny it a nuclear weapon.
Election-year politics, too, were part of Obama’s speech as he spoke of his record on Israel. He told his audience that his Republican rivals would probably distort his record.
‘‘There should not be a shred of doubt by now,’’ Obama said. ‘‘When the chips are down, I have Israel’s back.’’
The United States fears an Israeli strike on Iran would do little to derail its long-term nuclear weapons pursuit and, in the near term, would turn Iran into a victim. Many analysts believe an Israeli attack would result in a region-wide conflict, including Iranian attacks on American troops in the Persian Gulf.
Obama is also worried about gas prices, a chief concern to American voters this election year.
‘‘I would ask that we all remember the weightiness of these issues, the stakes involved for Israel, for America, and for the world,’’ Obama said. ‘‘Already, there is too much loose talk of war.’’
He summed up his approach by borrowing a line from a predecessor, Theodore Roosevelt: ‘‘Speak softly, but carry a big stick.’’
Israeli media focused on Obama’s strong threats to use force if necessary.
Eytan Gilboa, an expert on US-Israel relations at Bar Ilan University, said Obama’s speech would make it more difficult for Israel to act alone. But he added: ‘‘Is this sufficient to assure Netanyahu? No, I don’t think so.’’
The US and Europe have approved tough sanctions on Iran’s central bank and its key oil sector that are to go into effect this summer. Israel has welcomed the sanctions, but it is skeptical they will be enough. Israeli officials worry that by the time the toughest sanctions go into effect this summer, it may be too late to strike.
The influence of the lobbying group, known as AIPAC, has turned its polished Washington conference into a must-attend for American politicians. Republican presidential candidates Mitt Romney, Newt Gingrich and Rick Santorum will all address the group Tuesday, via satellite, as voters in 10 states make their picks for the party nominee.
An AIPAC spokesman, Patrick Dorton, said the group welcomed Obama’s remarks and ‘‘his strong resolve to work with Israel to solve the Iranian challenge.’’
Obama’s speech quickly turned into Sunday campaign fodder.
Romney, in Georgia, returned to his claim that ‘‘if Barack Obama is re-elected, Iran will have a nuclear weapon.’’
Santorum said, ‘‘The best thing that could happen to world markets is an Iran without a nuclear weapon, and a new Iranian regime, neither of which (Obama) is doing very much about to make happen.’’
In comments before Obama’s speech, Gingrich said he saw no evidence Obama would do what it took to keep Iran from getting nuclear weapons. ‘‘They talk and the Iranians build,’’ Gingrich said. ‘‘We’re being played for fools.’’
The Iranian threat has all but shoved aside the stalled quest for peace between Israelis and Palestinians, the dominant theme of Obama’s speech to AIPAC last year, and the thrust of his Israeli policy focus to date. On Sunday, Obama offered no new path.
The Israeli president, Shimon Peres, spoke before Obama and sought to portray ‘‘no space’’ between the US and Israeli position on Iran’s threat.
He said Israel knows the horrors of war and does not seek one with Iran, ‘‘but if we are forced to fight, trust me. We shall prevail.’’
Associated Press writers Amy Teibel in Ottawa, Ontario, Josef Federman in Jerusalem, Steve Peoples in Memphis, Tenn., and Kasie Hunt in Snellville, Ga., contributed to this report.