Speaking at a joint news conference, Obama and Netanyahu, who have sparred on numerous occasions in the past, presented a united front on Iran.
They stressed repeatedly that all options including military ones are on the table to keep Iran from acquiring an atomic weapon if the diplomatic track fails. And they brushed aside apparent differences over when the Iranian nuclear program might reach the point that military action is required.
"We will do what is necessary to prevent Iran from obtaining the world's worst weapons," Obama said, calling a nuclear-armed Iran a threat to Israel, the greater Middle East and the world.
Although Obama did not promise that the United States would act militarily against Iran if Israel decided that must be done, he offered an explicit endorsement for Israel to take whatever unilateral measures it deems necessary to guard against the threat.
"Each country has to make its own decisions when it comes to the awesome decision to engage in any kind of military action and Israel is differently situated than the United States," he said. "I would not expect that the prime minister would make a decision about his country's security and defer that to any another country any more than the United States would defer our decisions about what was important for our national security."
Netanyahu seized on the remarks, saying they were an important demonstration of America's steadfast alliance with Israel and part of making the carrot-and-stick approach a credible option to avoid the use of force.
"I am absolutely convinced that the president is determined to prevent Iran from getting nuclear weapons," he said. "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."
Netanyahu said the carrot-and-stick approach now being employed to cajole Iran into proving that's its nuclear intentions are peaceful had to be bolstered by "a clear and credible threat of military action." Obama's recognition of Israel's right to act alone appeared to satisfy him on that score, and the prime minister beamed with delight in response to the new security pact talks.
On another issue of critical importance to Israel's security, Obama said the U.S. is investigating whether chemical weapons were deployed in Syria earlier this week. He said he was "deeply skeptical" of contentions by Syrian President Bashar Assad's government that rebel forces were behind any such attack.
Both the Assad government and Syrian rebels have accused each other of using chemical weapons in an attack on Tuesday.
Obama said the U.S. policy not to intervene militarily or arm Syrian rebels thus far is based on his desire to solve the problem with world partners. He rejected as "inaccurate" suggestions that the United States had done nothing to stop two years of bloodshed that has claimed more than 70,000 lives.
"It's a world problem when tens of thousands of people are being slaughtered, including innocent women and children," Obama said.
Obama's three-day visit to Israel, from its start earlier Wednesday, is designed to send a message of reassurance to a key ally.
At an extravagant welcoming ceremony, Obama declared that "peace must come to the Holy Land" and not at Israel's expense. U.S. backing for Israel will be a constant as the Middle East roils with revolution and Iran continues work on its nuclear program, he said.
"The United States is proud to stand with you as your strongest ally and your greatest friend," Obama said after landing at Tel Aviv's Ben Gurion International Airport.
"Across this region the winds of change bring both promise and peril," he said, calling his visit "an opportunity to reaffirm the unbreakable bonds between our nations, to restate America's unwavering commitment to Israel's security, and to speak directly to the people of Israel and to your neighbors."
Seeking to alter a perception among many Israelis that his government has been less supportive of Israel than previous U.S. administrations, Obama declared the U.S.-Israeli alliance "eternal."
"It is forever," he said to applause as Israeli and U.S. flags fluttered in a steady breeze under clear, sunny skies.
Before leaving the airport for Jerusalem, Obama offered a vivid display of the U.S. commitment to Israeli security by visiting a missile battery that is part of Israel's Iron Dome defense from militant rocket attacks. The United States has invested hundreds of millions of dollars in developing the system with Israel.
Obama and Netanyahu toured the battery, which Israel relocated to the airport for the occasion. They met and chatted with soldiers who operate the system that Israel credits with intercepting hundreds of rockets during a round of fighting against Gaza militants last November.
In his comments to reporters with Netanyahu, Obama also took note of the difficult way forward in the broader quest for 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 hoped to return home with a better understanding of the constraints and "how the U.S. can play a constructive role."
Netanyahu, for his part, said he was willing to set aside preconditions in future talks with the Palestinians, adding that it was time to "turn a page in our relations."
Obama is to meet Palestinian Authority President Mahmoud Abbas in the West Bank on Thursday to assure him that an independent Palestinian state remains a U.S. foreign policy and national security priority even though he is bringing no new plan to restart negotiations with Israel.
Obama said he would outline his thinking in greater detail after he sees Abbas when he delivers a speech to Israeli university students, during which he will reiterate his position that a two-state solution is the only feasible outcome.
Although many Israelis warmly greeted Obama, Palestinians held several small protests in the West Bank and Gaza. Demonstrators in the Hamas-ruled Gaza Strip burned posters of Obama and U.S. flags, accusing the U.S. of being biased toward Israel.
In the West Bank, about 200 activists erected about a dozen tents in an area just outside of Jerusalem to draw attention to Israel's policy of building settlements. The tents were pitched in E1, a strategically located area where Israel has said it plans on building thousands of homes. The U.S. has harshly criticized the plan.