Democratic presidential hopeful Barack Obama visited the rocket-battered southern town of Sderot on Wednesday, where he said that the entire world must act to thwart Iran's nuclear ambitions.

"A nuclear Iran would pose a grave threat and the world must prevent Iran from obtaining a nuclear weapon," Obama stated.

The Illinois senator also warned that a situation in which Iran had achieved this capability would be "game-changing."

"Not just in the Middle East, but around the world," he added. "Whatever remains of our Non-Proliferation Treaty would begin to disintegrate."

Obama vowed that as president he would not force Israel into making concessions that would put the country in danger for the sake of the peace process.

"I don't think that Ms. Livni or Mr. Barak or Bibi [Opposition leader Benjamin] Netanyahu or the others, President Peres, when they spoke to me today got any sense that I would be pressuring them to accept any kinds of concession that would put their security at stake," he said in answer to a question from a journalist.

Later in the day he meet with Prime Minister Ehud Olmert for dinner, at which point he told reporters that he had found among the Palestinians "a strong sense that progress is being made and honest conversations are taking place" in the peace talks.

"Indeed, that's right," answered Olmert, who has pursued several diplomatic initiatives even as a corruption probe threatens to force him from office.

At the Sderot press conference, Obama said that Israel had every right to defend itself against attacks on its civilians, referring to the Qassam rockets that plagued the southern town and neighboring communities until a recent cease-fire with Gaza's Hamas rulers.

"If somebody was sending rockets into my house where my two daughters sleep at night, I would do everything in power to stop that, and would expect Israelis to do the same thing," he said.

In Gaza, Hamas official Fawzi Barhoum called Obama's remarks part of the American policy of bias toward Israel and giving legitimacy to Israeli crimes against our people.

The presidential hopeful was accompanied on his Sderot stop by Foreign Minister Tzipi Livni and Defense Minister Ehud Barak.

Barack Obama at Yad Vashem (AP)

Earlier Wednesday, Obama pledged that as president he would preserve the close relationship between Washington and Jerusalem, and vowed that Israel's security would be a top priority in his administration.

"I'm here on this trip to reaffirm the special relationship between Israel and the United States and my abiding commitment to Israel's security and my hope that I can serve as an effective partner, whether as a U.S. senator or as president," Obama said during a meeting with President Shimon Peres.

Obama, after vowing to immediately work for a breakthrough in Israeli-Palestinian peace negotiations if elected U.S. president, plunged into the intricacies of the region's conflict Wednesday with a packed schedule of meetings with Israeli and Palestinian leaders.

He visited the Yad Vashem Holocaust memorial in Jerusalem and held meetings with Peres, Barak and Netanyahu.

Netanyahu, the Likud chairman and former prime minister, said following their talks Obama promised never to seek to damage Israel's security. Both men agreed on the "primacy" of preventing Iran from becoming a nuclear power, Netanyahu said.

During his visit to Yad Vashem, Obama laid a wreath, lit a memorial flame, and deemed the place to ultimately be a place of hope.

"At a time of great peril and torment, war and strife, we are blessed to have such a powerful reminder of man's potential for great evil, but also our capacity to rise up from tragedy and remake our world," he wrote in the visitors' book.

American tourists who passed him by at the memorial told him, "Remember what you see here," and he replied, "Yes, I understand, I understand," said Yad Vashem's director, Avner Shalev.

Security guards at the memorial kept back the few American and European visitors who had hoped to get a closer glimpse of the presidential contender.

But the somberness of the occasion at Yad Vashem also gave way to moments of warmth and lightheartedness.

Peres gave him an effusive welcome, saying he had read Obama's two books and was moved by them. The Israeli president handed Obama an English translation of a book he himself wrote, The Imaginary Voyage: With Theodor Herzl in Israel.

Obama praised Israel's accomplishments 60 years after its creation, and complimented the 84-year-old Israeli president on his youthful appearance.

"I also want to get his recipe for looking as good he does," Obama said.

Obama meets Abbas, Fayyad in Ramallah

In the afternoon Obama made the short drive from Jerusalem to the West Bank town of Ramallah for talks with Palestinian President Mahmoud Abbas and Palestinian Prime Minister Salam Fayyad.

Obama's trip to the West Bank on Wednesday appeared to generate some goodwill among Palestinians, though deep skepticism about U.S. policy remains.

Obama met with Abbas for an hour Wednesday under heavy security at Abbas' West Bank government headquarters.

Obama deepened Palestinian fears of an irrevocable U.S. bias towards Israel in a speech to American Jewish leaders in June when he said Jerusalem must remain Israel's undivided capital - even though no U.S. government has recognized Israel's 1967 annexation of east Jerusalem, the sector claimed by the Palestinians as their future capital.

Obama later clarified that he believes the future of Jerusalem is to be determined in negotiations - Washington's longstanding policy. The fate of the city is currently on the table in U.S.-backed Israeli-Palestinian peace talks.

Palestinian officials said they didn't bring up the Jerusalem remarks in their meeting with Obama on Wednesday.

However, Kadoura Fares, a legislator in Abbas' Fatah movement, said Obama's slip-up on such a key issue caused serious damage. "His correction was not enough," Fares added. "He should have said he recognizes the Palestinian right to freedom."

The Islamic militant Hamas group, which rules the Gaza Strip, said Obama was not welcome and criticized Abbas, a bitter rival, for receiving him. "Obama wants to go to the White House through Tel Aviv, at the expense of the Palestinians," said Fawzi Barhoum, a Hamas spokesman.

Abbas aides insist the Palestinian leader's meeting with Obama offered an important opportunity.

Abbas listed Palestinian grievances, including Israel's "continued settlement construction and refusal to ease restrictions on the movement of Palestinians in the West Bank," said Abbas aide Saeb Erekat.