During his tour of Jordan, Israel and the Palestinian territories, Benedict visited Christian, Jewish and Muslim sites and met religious and political leaders, including Mahmoud Abbas, the Palestinian president, and Binyamin Netanyahu, the Israeli prime minister.
Before boarding an aircraft for Rome at Israel's international airport, Benedict said meeting with Holocaust survivors at Yad Vashem in Jerusalem was "one of the most solemn moments" of his pilgrimage.
"Those deeply moving encounters brought back memories of my visit three years ago to the death camp at Auschwitz, where so many Jews - mothers, fathers, husbands, wives, brothers, sisters, friends - were brutally exterminated under a godless regime," he said.
Benedict said the Nazi ideology of anti-Semitism and hatred had written an "appalling chapter of history (that) must never be forgotten or denied".
He also appealed strongly for peace between Israelis and Palestinians so each can live in their own state, as trustful neighbours in security.
"One of the saddest sights for me during my visit to these lands was the wall," he said of the high barrier that Israel erected between Jerusalem and Bethlehem, the Palestinian town that was the birthplace of Jesus according to Christian belief.
"As I passed alongside it, I prayed for a future in which the peoples of the Holy Land can live together in peace and harmony without the need for such instruments of security and separation."
Benedict's meeting with Netanyahu behind closed doors on Thursday "centred on how the peace process can be advanced", according to the Vatican.
In televised remarks following the talks, Netanyahu did not mention the Palestinian issue, focusing instead on Iran.
"I asked him [Benedict], as a moral figure, to make his voice heard loud and continuously against the declarations coming from Iran of their intention to destroy Israel," Netanyahu said.
"Secondly, we spoke also about the historic process of reconciliation between Christianity and Judaism, and the pope is very interested."