Pope Benedict XVI has finished his eight-day pilgrimage to the Middle East, calling for an end to fighting between Israel and the Palestinians.
At a farewell ceremony, attended by Israeli leaders, he called for "no more bloodshed, no more fighting".
He said the Holocaust "must never be forgotten or denied".
Israeli President Shimon Peres thanked him for his visit, calling it a "profound demonstration of the enduring dialogue" between Christians and Jews.
He particularly highlighted the Pope's statement about the Holocaust never being denied, saying it carried "substantive and special weight".
"It touched our hearts and minds."
The Pope, in reply, described the "powerful impressions" he had gathered during his visit.
Meeting Holocaust survivors at Yad Vashem in Jerusalem was "one of the most solemn moments" for him.
"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."
The "appalling chapter of history must never be forgotten or denied", he said.
During his visit, the Pope was criticised by commentators and politicians for failing to express sufficient remorse for the Holocaust and over his membership of the Hitler Youth as a teenager.
Addressing the Middle East conflict, the Pope pleaded for an end to violence: "No more bloodshed, no more fighting, no more terrorism, no more war."
He reiterated the call for a two-state solution, as Israel had the right to exist, and the Palestinians "have a right to a sovereign independent homeland".
He also spoke about the wall built by Israeli authorities to separate Israel from Palestinian territories.
"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."
On his final day in Jerusalem the Pope visited the Church of the Holy Sepulchre, believed to stand upon the site where Jesus was crucified.
He told pilgrims that the "bitter fruits of recrimination and hostility can be overcome".
The Pope was greeted at the church, one of the holiest shrines in Christendom, by representatives of the Catholic, Orthodox, Coptic, Armenian and Ethiopian churches, which jointly administer the site.
He knelt in front of the Stone of the Anointing, where Jesus' body is said to have been prepared for burial after the crucifixion, and prayed in the tomb where Christians believe his body was interred for the three days before the resurrection.
He then led prayers in the church, which he said would conclude his pilgrimage, telling the congregation not to lose hope.
The Pope's busy tour has included visits to sites sacred to all three monotheistic religions.