Washington (CNN) -- Preventing Iran from developing a nuclear weapon is a national security interest of both Israel and the United States, President Barack Obama said Sunday in calling for continued diplomatic efforts but also pledging that all options -- including a military effort -- remain viable.
"All elements of American power" remain an option to stop Iran from becoming a nuclear power, including "a military effort to be prepared for any contingency," Obama told the American Israel Public Affairs Committee (AIPAC), a pro-Israel lobby group.
At the same time, Obama made clear that he preferred diplomacy over war both as a principle and in the case of Iran, and he warned that "too much loose talk of war" with Iran only benefits the Iranian government by driving up the price of oil.
The remarks came against a backdrop of growing international concern that Israel may attack an Iranian nuclear facility. Israel and the United States accuse Tehran of seeking nuclear weapons despite the Iranian regime's insistence that its program is for peaceful purposes.
Obama's speech was intended to allay concerns in Israel and in the American Jewish community that he lacked commitment to support an Israeli attack.
The president stated his policy was not containment of a nuclear Iran, but preventing Iran from obtaining a nuclear weapon. At the same time, he emphasized that Iran "should not doubt Israel's sovereign right to make its own decisions about what is required to meet its security needs."
While Obama's position was consistent with his past pronouncements, his specific reference to preventing Iran from developing a nuclear weapon -- rather than the capability of building a nuclear weapon -- maintained what some consider to be a difference from Israel's position.
Israeli officials say that if Iran was able to enrich weapons-grade uranium, it would potentially cross the "red line" of nuclear weapons capability that Israel fears. Prime Minister Benjamin Netanyahu will meet with Obama on Monday at the White House to discuss that issue and others before speaking at the AIPAC conference.
In a statement issued after Obama's speech, Netanyahu expressed appreciation for the president's position that all options were on the table to prevent Iran from developing a nuclear weapon.
"I also appreciated the fact that he made clear that when it comes to a nuclear-armed Iran, containment is simply not an option, and equally in my judgment, perhaps most important of all, I appreciated the fact that he said that Israel must be able to defend itself, by itself, against any threat," Netanyahu said.
To Trita Parsi, the president of the National Iranian American Council who wrote the book "Treacherous Alliance - The Secret Dealings of Iran, Israel and the United States," Obama' s speech showed that a difference continues to exist between the United States and Israel on Iran.
Israel "argues that the only acceptable guarantee that Iran does not get a nuclear weapon is for Iran to have no enrichment program," Parsi said in an email. "The Obama administration puts the red line not at enrichment -- which is permitted under international law -- but at nuclear weapons. This is a clearer, more enforceable red line that also has the force of international law behind it."
In his remarks Sunday, Obama defended what he called his administration's consistent record of supporting Israel economically, diplomatically and militarily -- including U.S. military assistance and blocking anti-Israel efforts at the United Nations.
Noting the current political season in the United States with an upcoming election in November, Obama also said U.S. support for Israel should be a bipartisan issue. He dismissed criticism of his record by Republicans, saying "it's not backed up by the facts."
"There should not be a shred of doubt by now, when the chips are down, I have Israel's back," Obama said to applause.
Before Obama spoke, Republican operative Liz Cheney said during a panel discussion that no U.S. president had done more to undermine Israel than Obama.
David Harris, the executive director of the American Jewish Committee, said he doubted Obama's speech would satisfy everyone. While some will embrace Obama's core message of an ironclad commitment to Israel, others will question why Obama didn't go further in specifying his intentions regarding Iran, Harris said.
In addition, Harris said he expected the Republican presidential candidates, when addressing the conference this week, to "mince few words on Iran," something that is easier to do "as they don't have to directly bear the consequences of their words."
In an unusual move last week, the Democratic National Committee sent out a video aimed at fending off potential Republican attacks over Obama's Israel policies.
Earlier Sunday at the opening of the AIPAC conference, Israeli President Shimon Peres accused Iran of plotting to control the Middle East, and warned "it will be stopped."
Israel "does not seek" war, Peres said, adding: "Peace is always our first option. But, if we are forced to fight, trust me, we shall prevail."
Speaking just before Obama, Peres said,"The United States and Israel share the same goal: to prevent Iran from developing a nuclear weapon. There is no space between us. Our message is clear: Iran will not develop a nuclear weapon."
"Iran is an evil, cruel, morally corrupt regime," Peres said. "It is based on destruction. It is an affront to human dignity. Iran is the center, the sponsor, the financier of world terror. Iran is a danger to the entire world. It threatens Berlin as well as Madrid, Delhi as well as Bangkok."
Israel blames Iran for recent attacks apparently aimed at Israeli diplomats in Thailand and India.
"Iran's ambition is to control the Middle East, so it can control a major part of the world's economy," Peres said. "It must be stopped. And it will be stopped."
Obama has argued that a military attack on Iran may not be the key to resolving nuclear concerns.
"At a time when there is not a lot of sympathy for Iran and its only real ally, (Syria) is on the ropes, do we want a distraction in which suddenly Iran can portray itself as a victim?" Obama said last week in an interview with The Atlantic.
He made the same contention Sunday, saying history showed that the only way to truly halt nuclearization is when countries halt their programs themselves.
In his speech Sunday, Peres helped create a welcome reception for Obama.
"I know your commitment to Israel is deep and profound," Peres said. "Under your leadership, security cooperation between the U.S. and Israel has reached its highest level. Ladies and gentlemen, we have a friend in the White House."
The remarks may help shore up election-year support for Obama among Jewish voters.
In his later remarks, Obama praised Peres as a leader and a living example of Israel's history and values, and announced he would award Peres the presidential Medal of Freedom -- America's highest civilian honor -- at the White House later this year.
The audience responded with a long ovation that Obama joined from the podium, and Netanyahu later said in his statement that he congratulated Peres on the Medal of Freedom and called it "a great honor for the State of Israel."
While the prime minister is the head of Israel's government, Peres holds some authority as president including serving as head of state and appointing some senior officials.
On the other major issue of U.S.-Israeli relations, Peres also called the principle of a two-state solution with Palestinians "a paramount Israeli interest."
He noted that he meets "from time to time" with Palestinian President Mahmoud Abbas and Prime Minister Salam Fayyad. "They need and they want peace. I believe that peace is possible. They are our partners for peace. Not Hamas."
Peres also had a message for Syrians facing a violent crackdown on an uprising against the regime.
"The Middle East is undergoing its greatest storm in history, with horrible bloodshed in Syria, where a tyrant is killing his people, killing his children," Peres said. "I admire the courage of the Syrian people. And I wish them peace and freedom from the depths of all of our hearts. In spite of the storm, we have to reach out to the young generation in the Arab world, to those who strive for freedom, democracy and peace."
CNN's Josh Levs, Kevin Flower, Joe Sterling and Gabriella Schwarz contributed to this report.