US President Barack Obama has paid his respects to the heroes of Israel and victims of the Holocaust on the final day of his Middle East tour.

Obama visited the graves of Theodor Herzl, founder of modern Zionism, and former Israeli Prime Minister Yitzhak Rabin.

Accompanied by Israeli Prime Minister Benjamin Netanyahu and President Shimon Peres, Obama placed a small stone atop the graves of the two leaders, in accordance with Jewish custom.

The White House said the stone placed on Rabin's grave was taken from the grounds of the Martin Luther King memorial in Washington as a gesture to underline the close link between the US and Israel.

Awarded the Nobel Peace Prize together with Shimon Peres and Yasser Arafat for his efforts to settle the Palestinian issue in 1994, Rabin was assassinated by right-wing Israeli radical Yigal Amir one year later.

"[Rabin] was a great man," Obama told members of the former PM's family.

He also visited Israel's Yad Vashem Holocaust memorial and then headed to the Church of the Nativity in Bethlehem.

The tour, which included Thursday's visit to see the Dead Sea Scrolls, was full of symbolic significance, acknowledging the historical and ideological rationale behind Israel's existence.

"Make no mistake: those who adhere to the ideology of rejecting Israel's right to exist might as well reject the earth beneath them and the sky above, because Israel is not going anywhere," Obama said in his acclaimed speech to the Israeli people at the Jerusalem Convention Center.

"Today, I want to tell you - particularly the young people - that so long as there is a United States of America, Ah-tem lo lah-vahd (You are not alone)."

Obama is due to fly to neighbouring Jordan to meet with King Abdullah II.

In the Jordanian capital Amman, Obama and Abdullah are to discuss the regional crisis and the increasing influx of Syrian refugees into Jordan.

About half a million Syrians have crossed the Jordan border to find refuge from the civil war that has killed more than 60,000 people in the last two years.