By Tom Cohen. John King and Jessica Yellin
JERUSALEM (CNN) -- President Barack Obama paid tribute to the father of modern Zionism on Friday in a symbolic visit to Theodor Herzl's grave before ending his trip to Israel by departing for neighboring Jordan for talks with King Abdullah II.
Joined by Israeli President Shimon Peres, Prime Minister Benjamin Netanyahu and U.S. Secretary of State John Kerry, Obama also visited the grave of former Prime Minister Yitzhak Rabin, who was assassinated in 1995.
Both stops were intended to bolster Obama's standing with Israelis by demonstrating his understanding of the history of the Jewish state.
Obama placed a stone at each grave from the grounds of the Martin Luther King Jr. memorial in Washington in a gesture to link the African-American struggle for freedom with the struggle by the Israeli people for a homeland.
The president also visited the Holocaust memorial Yad Vashem, where he turned up the "eternal flame" of remembrance of the millions of Jewish victims of Nazi death camps in World War II.
Obama called for the world today to follow the example of nations that intervened in Nazi genocide.
"Here, alongside man's capacity for evil, we are also reminded of man's capacity for good," he said. "The rescuers, the righteous among nations, who refused to be bystanders, and in their noble acts of courage, we see how this place, this accounting of horror, is in the end a source of hope."
In another cultural stop Friday, Obama also visited the Church of the Nativity in Bethlehem, which is on the West Bank, with Palestinian President Mahmoud Abbas.
After putting himself in the middle of the historic tensions between Israelis and Palestinians this week, Obama wrapped up the first trip of his second term and his first trip to Israel since becoming president by heading to Jordan, a military and intelligence partner that has been facing trying times.
Abdullah under duress
Abdullah has a reputation for benevolence, unlike autocratic rulers such as Syria's Bashar al-Assad or deposed Iraqi dictator Saddam Hussein. One house of the Jordanian parliament is democratically elected.
However, a bad economy and allegations of corruption by public officials have stoked dissatisfaction with Abdullah.
In addition, the country wedged between the Palestinian territories, Iraq and Syria has seen more than its share of refugees from them all. Jordan currently shelters more Syrian refugees than any other country -- more than 300,000, according to the United Nations.
In November, crowds took to the streets calling for Abdullah's downfall because of rising gasoline prices.
More recently, comments attributed to Abdullah in the U.S. magazine The Atlantic caused further anger against the king, who was quoted as calling the opposition Muslim Brotherhood a "Masonic cult" and referring to tribal elders in his country as "old dinosaurs."
The royal palace denied that Abdullah made the comments.
Young Israelis applaud Obama
In Israel, Obama tried Thursday to invigorate the stalled Middle East peace process, urging young Israelis to pressure their leaders to seek peace with Palestinians while acknowledging the Jewish state's historical right to exist and defend itself from continuing threats.
In a speech in Jerusalem that Obama had said would lay out his vision for the region, the president urged Israelis to look at the world through the eyes of Palestinians but also said enemies of Israel must change their rhetoric and tactics to reflect modern reality.
"You are not alone," Obama said in both English and Hebrew, prompting a standing ovation when he declared that "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."
When Obama mentioned the name of Abbas in his speech, some boos erupted in the Jerusalem Convention Center among the audience of mostly young Israelis. He also was interrupted at one point by a protester's shouts, causing the president to joke that the heckling "made me feel at home," in reference to the caustic political climate in Washington.
He urged Israelis to empathize with the plight of Palestinians, using direct and harsh imagery to make his point, and he drew applause when he criticized the Israeli government's controversial policy of building new settlements in disputed territories.
Symbols and gestures
Hours before the speech on the second day of his Middle East swing, two rockets fired from Palestinian-controlled Gaza landed in southern Israel.
They caused no injuries or major damage, but served as a symbolic welcome to Obama's visit to the West Bank later in the day.
In another symbolic moment, Obama received Israel's highest civilian honor -- the Presidential Medal of Distinction -- Thursday night from Peres at a state dinner that emphasized the close ties between their countries.
Noting the similarity between the histories of Israelis and African-Americans as former slaves who endured hardship before gaining freedom in a new land, Obama said "our very existence, our presence here tonight, is a testament that all things are possible."
In what Netanyahu called a key development of Obama's visit, the leaders announced new talks on extending U.S. military assistance to Israel for another 10 years past the current agreement, which expires in 2017.
During his earlier visit to Ramallah in the West Bank, Obama stressed the need for direct talks between Israelis and Palestinians for a two-state solution.
"The Palestinian people deserve an end to occupation and the daily indignities that come with it," he said at a news conference with Abbas, adding that Palestinians deserve "a future of hope" and a "state of their own."
The core issues right now, Obama said, are achieving sovereignty for Palestinians and security for Israel.
Abbas, however, said the Israeli settlements are "more than a hurdle to peace," calling them illegal and saying it was Israel's duty to stop building them.
He envisioned a Palestinian state based on 1967 borders with Jerusalem as capital -- a scenario unacceptable to Israel.
-- CNN's John King and Jessica Yellin reported from Israel, and CNN's Ben Brumfield contributed to this report written by Tom Cohen in Washington.