Barack Obama, the US Democratic presidential candidate, has said he backs Israel's decision not to negotiate with the Palestinian group Hamas.
Speaking in the Israeli town of Sderot, which has been hit by rocket attacks from Hamas-controlled Gaza, Obama said the US also supported Israel's right to defend itself "against those who threaten its people".
He also reiterated his position that Jerusalem "will be" the capital of Israel.
However the Illinois senator, currently on the final leg of his Middle East tour, said that he believed the city to be a "final status issue" that must be decided by negotiation and said he remained committed to a two-state solution to the conflict.
The status of Jerusalem remains one of the most contentious parts of any solution to the Middle East conflict.
In June Obama caused anger in the Arab world when he said that Jerusalem should be Israel's undivided capital.
The international community, including the United States, does not recognise Israel's claim that Jerusalem is its undivided capital and Palestinians hope to have occupied East Jerusalem as the capital of any future Palestinian state.
Obama also said that he would take "no options off the table" with regards to Iran, saying the country posed a "grave threat
"A nuclear Iran would be a game-changing situation, not just in the Middle East but around the world," Obama said.
The Illinois senator, who had earlier held talks with Palestinian leaders in the West Bank city of Ramallah,
said that if he was elected he would adopt a policy of "big sticks and big carrots" regarding the Iranian government.
"I would at my time and choosing be willing to meet with any leader if I thought it would promote the national security interest of the United States of America," he said.
Obama travelled from Jerusalem to the West Bank city on Wednesday for talks with Mahmoud Abbas, the Palestinian president, and Salam Fayyad, the prime minister, before heading to Sderot.
Later he will meet Ehud Olmert, the Israeli prime minister before flying to Germany for talks with Angela Merkel, the German chancellor.
Security was tight for Obama's West Bank visit, with helmeted riot police carrying truncheons and rifles lining the access road to the walled compound as he shook hands with an Abbas aide and then entered the building.
The Illinois senator's Middle East tour has been an attempt by the Democratic presidential candidate to bolster his foreign policy credentials ahead of the US's presidential election in November.
The visit is in contrast to John McCain, the Republican presidential candidate, who did not visit the West Bank during his time in the region.
Earlier on Wednesday, while meeting Shimon Peres, the Israeli president, Obama pledged that that as president he would preserve the close ties between the US and Israel, and 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 US senator or as president," Obama said.
At Israel's Yad Vashem Holocaust memorial, he laid a wreath, lit a memorial flame, and deemed the place to ultimately be "a place of hope".
He was also due to tour the Western Wall, Judaism's holiest site.
Obama's visit in the West Bank has generated some goodwill, particularly since his Republican rival, John McCain, did not visit the Palestinians during a Middle East trip earlier in the summer.
Nour Odeh, Al Jazeera's corrrespondent in Ramallah, said: "The Bush administration only began to be engaged in the Middle East peace process in November 2007 at Annapolis. That peace process is yet to yield any results and is not expected to conclude with a Palestinian state - as promised - at the end of 2008.
"There were a lot of Palestinian frustrations right before Barack Obama came to Ramallah ... but keep in mind that this visit to the West Bank town is only for 45 minutes. Obama is keeping the better part of his day visiting Israeli officials and concentrating on the very important Jewish vote in the US
Click to view image: '204886-2008723124022401371_31.jpg'
|Liveleak on Facebook|