Washington: US President Barack Obama and Israeli Prime Minister Benjamin Netanyahu met for several hours during which the two leaders discussed among other things the threat from Iran, the White House said.

"They spoke at length about the threat from Iran," White House said in a statement after the meeting, which it said lasted for several hours.

Obama reaffirmed the US policy to prevent Iran from obtaining a nuclear weapon.

"He reiterated the US' commitment to pursuing a strategy of principled diplomacy, backed by unprecedented pressure, including the additional sanctions that are taking hold on the Iranian regime," the White House said.

"He further reiterated that all options are on the table to prevent Iran from obtaining a nuclear weapon. The two leaders also discussed a range of regional issues, including Middle East peace, and the tragic situation in Syria," White House said, adding the two leaders agreed to consult closely going forward.

Earlier in the day, during a joint press availability Obama said he "reserve all options" to prevent Iran from acquiring nuclear weapons, but believes there is still time for diplomatic options on this.

"Even as we will continue on the diplomatic front, we will continue to tighten pressure when it comes to sanctions, I reserve all options, and my policy here is not going to be one of containment. My policy is prevention of Iran obtaining nuclear weapons. When I say all options are at the table, I mean it," he said.

Obama said both he and Netanyahu prefer to resolve this diplomatically.

"We understand the costs of any military action. And I want to assure both the American people and the Israeli people that we are in constant and close consultation," he said.

"I think the levels of coordination and consultation between our militaries and our intelligence not just on this issue but on a broad range of issues has been unprecedented. And I intend to make sure that that continues during what will be a series of difficult months, I suspect, in 2012," he said.

Obama said everyone knows that it's unacceptable from Israel's perspective to have a country with a nuclear weapon that has called for the destruction of Israel.

"But... it is profoundly in the US' interest as well to prevent Iran from obtaining a nuclear weapon. We do not want to see a nuclear arms race in one of the most volatile regions in the world," he said.

"We do not want the possibility of a nuclear weapon falling into the hands of terrorists. And we do not want a regime that has been a state sponsor of terrorism being able to feel that it can act even more aggressively or with impunity as a consequence of its nuclear power," Obama said.

"That's why we have worked so diligently to set up the most crippling sanctions ever with respect to Iran. We do believe that there is still a window that allows for a diplomatic resolution to this issue, but ultimately the Iranians' regime has to make a decision to move in that direction, a decision that they have not made thus far," he said.

In his remarks, Netanyahu said that Israel retains the right to defend itself.

"After all, that's the very purpose of the Jewish state -- to restore to the Jewish people control over our destiny. And that's why my supreme responsibility as Prime Minister of Israel is to ensure that Israel remains the master of its fate," he said.