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.
@highlight
NEW: Prime Minister Netanyahu says he appreciates Obama's remarks on Iran
@highlight
An analyst says Israel and President Obama differ over defining Iran's nuclear threat
@highlight
Obama says he prefers diplomacy but keeps all options available
@highlight
Israeli President Peres praises Obama's "deep and profound" commitment to Israel
Israel "does not seek" war, @placeholder said, adding: "Peace is always our first option.