U.S. President Barack Obama pledged on Wednesday to work closely with Israel and do whatever was necessary to keep the Islamic Republic from obtaining nuclear arms, "the world's worst weapons."

All the latest news and analysis on Obama's visit can be found here

Obama, visiting Israel for the first time as president, said during a joint press conference with Prime Minister Benjamin Netanyahu in Jerusalem that there was "not a lot of daylight" between U.S. and Israeli assessments of where Iran is on its nuclear development. He was quick to note "there is time to resolve this diplomatically," but added that "all options are on the table" if diplomacy falls short.

"The question is, will Iranian leadership seize that opportunity," he said. The U.S. president also said Iran's past behavior indicates that"we can't even trust yet, much less verify."

Subscribe to Haaretz Digital Editions to get full coverage on Obama's visit and all news and analysis from Israel, the Middle East and the Jewish world.

Netanyahu, for his part, said he and Obama agree that it would take Iran about a year to manufacture a nuclear weapon if it tries to do so. Netanyahu also said he was "absolutely convinced that the president is determined to prevent Iran from getting nuclear weapons," and that he was certain Obama appreciated that Israel "can never cede the right to defend ourselves to others, even to the greatest of our friends", a hint at a possible go-it-alone plan to attack Iran's nuclear program."

"I appreciate that. I appreciate the fact that the president has reaffirmed, more than any other president, Israel's right and duty to defend itself by itself against any threat," said Netanyahu. Obama, whose administration has in the past privately sought to head off a unilateral military strike against Iran, said Netanyahu was "absolutely correct" that each country has the right to defend itself.

Obama also expressed a desire for a resumption of Israeli-Palestinian talks but brought no new proposals and made no mention of Israeli settlement-building, a main factor behind the collapse of the U.S.-sponsored negotiations in 2010. He said he wanted to hear from each side before determining a way forward. He meets Palestinian President Mahmoud Abbas in Ramallah on Thursday.

Obama noted the difficulty of finding a path forward in the broader questf or Mideast peace, acknowledging that in recent years "we haven't gone forward, we haven't seen the kind of progress that we would like to see."

The president said he came to the region principally to listen and hopes toreturn home with a better understanding of the constraints and "how theU.S.­ can play a constructive role." "This is a really hard problem," he said.

Netanyahu, meanwhile, said that Israel's new government was committed to the principle of two states for two peoples and to the establishment of a Palestinian state.

"Israel remains fully committed to peace and the solution of two states for two peoples," Netanyahu said at the joint press conference. "We extend our hand of peace to the Palestinian people,"  Netanyahu said. He expressed the hope that Obama's visit and  that of Secretary of State John Kerry would bring the parties back to the negotiating table to achieve "a historic compromise."

Netanyahu told reporters, while affirming his commitment to the two-state solution, that  wanted to dispel the question marks around the policy of the new government vis a vis the Palestinian issue.

The questions have come up due to the fact that the new government's guidelines contain nothing about the establishment of a Palestinian state. Moreover, the coalition, including Habayit Hayehudi, and the large segment of Likud opposed to a Palestinian state, have raised concerns in the international community.

The Palestinian issue was relatively marginal at the prime minister's three and a half hour meeting with Obama, however. The main issues at the meeting were the Iranian nuclear program and the civil war in Syria. On Iran, the gaps between Netanyahu and Obama on Iran have narrowed, but disagreement still exists, especially on the amount of time to be given to seeking a diplomatic solution before other options.

Obama also pledged during his press conference with Netanyahu to investigate whether chemical weapons were used this week in neighboring Syria's two-year-old civil war.

Obama and Netanyahu announced during the press conference that they had decided to begin talks on extending the defense assistance agreement between the United States and Israel, which is due to expire in 2017.  The agreement gives Israel $3 billion a year for defense purchases. The two said talks would seek to renew the agreement for another 10 years.

Obama also said the United States would continue to assist Israel in acquiring additional Iron Dome anti-missile batteries despite cuts to the U.S. defense budget.  He said that in 2013, the United States would give Israel another $200 million for this purpose.

As opposed to previous meetings, Netanyahu and Obama chose to highlight their points of agreement, "I would not expect that the prime minister would defer decisions on his country's security to other countries," Obama said.

Also present  at the meeting between Obama and Netanyahu was National Security Adviser Yaakov Amidror and the Netanyahu's military secretary Eyal Zamir, and on the American side, National Security Adviser Thomas Donilon and Kerry. After the meeting and the press briefing, the two leaders dined, joined by newly appointed Defense Minister Moshe Yaalon and Justice Minister Tzipi Livni.

Obama landed in Israel on Wednesday afternoon, and was greeted by Netanyahu, President Shimon Peres, and all of the ministers of Israel's recently formed government. He will remain in Israel until Friday, and his secretary of state, John Kerry, will return to the country on Saturday for talks with Netanyahu.