In a powerful direct appeal to Israelis, President Barack Obama Thursday insisted a two-state peace with the Palestinians could still be forged and was their only hope of true security.

In a trademark soaring address, Obama also built on his vow of an "eternal" defence of the Jewish state in the face of Iran's nuclear programme, which has been at the centerpiece of his first trip to the country as US president.

Obama declared that "Israel is at a crossroads" as he sought to convince young Israelis to reshape the internal political dynamics which have seen peace talks frozen for two years.

"Peace is necessary. Indeed it is the only path to true security," Obama told an exuberant audience at a Jerusalem conference centre.

"You can be the generation that permanently secures the Zionist dream," Obama said, warning that a two-state solution was the only way to ensure Israel remained a Jewish state amid changing demographics.

Hours after taking a helicopter ride into the West Bank, over barbed wire fences and the walls of Israel's anti-militant barrier, Obama urged his young Israeli audience to "look at the world through (Palestinian) eyes."

At a state dinner later in his Jerusalem residence, President Shimon Peres told his guest that he was "moved by the way in which you spoke to the hearts of the young Israelis."

Earlier, Obama's edgy news conference with Palestinian president Mahmud Abbas in Ramallah reflected Palestinian disappointment with his failure to live up to first-term vows to help forge a Palestinian state.

The frosty atmosphere lacked the bonhomie of the bonding session he held with Israeli Prime Minister Benjamin Netanyahu on Wednesday, as the two leaders, both setting off on new mandates, sought to prove their prickly relationship was a thing of the past.

In Ramallah Obama condemned the "continuing threat" of attacks from the Hamas-run Gaza Strip after two rockets hit southern Israel, near the town of Sderot.

The United Nations also joined the condemnation: "We condemn all rocket fire and call for it to stop," a UN statement said.

In front of Abbas, Obama said that the two-state solution was still a possibility, despite claims that Israeli settlement building had crushed Palestinian dreams of a contiguous state.

Although he singled out Israeli settlements on lands Palestinians see as part of their future state as a major impediment to reviving peace talks, Obama did not call for a new construction ban.

Abbas was less hazy on the question in private talks with Obama, according to his political adviser Nimr Hammad.

"A resumption of negotiations is not possible without an Israeli settlement freeze in the West Bank and east Jerusalem," Hammad told AFP.

Israel says it will not come back to talks with pre-conditions.

Obama came to the Middle East amid tepid expectations, promising not to table grand plans but to assess the prospects for progress.

But the striking ambition of his speech will be sure to raise expectations of a new US intervention to revive the peace process.

Obama made similar calls for movement in Middle East talks in 2009 with his seminal Cairo speech -- but failed to live up to the expectations he generated, as the peace moves crashed.

Officials said Obama would send Secretary of State John Kerry back to Israel on Saturday to follow up on his visit with Israeli leaders.

A statement from the office of Netanyahu, who heads a new governing coalition, thanked Obama for his "unreserved" support for Israel and agreed on the need for peace with the Palestinians.

But newly appointed cabinet minister Naftali Bennett, leader of the far-right Jewish Home party, was scathing.

"Obama's words certainly came out of a concern for Israel and from true friendship but we experienced the results of our previous withdrawal this morning in Sderot and in the thousands of victims during past years," he wrote on his Facebook page. "A Palestinian state is not the right way."

Obama also urged foreign states to blacklist Lebanon's Hezbollah for its attacks on Israelis.

"Every country that values justice should call Hezbollah what it truly is -- a terrorist organisation," he said in remarks aimed at the European Union.

Obama also issued a fresh call for Syrian President Bashar al-Assad to leave power as the bloody uprising against his regime, which the UN estimates has so far claimed 70,000 lives, enters its third year.

With Netanyahu on Wednesday, Obama warned that any use by Assad of chemical weapons would be a "game-changer" that would lead to international action.

And he issued a fresh warning to Iran, stressing that the time for pursuing a diplomatic resolution to its controversial nuclear program was "not unlimited."