Pope Francis has visited the most important holy sites for Muslims and Jews in Jerusalem's Old City on the final day of his Middle East tour.
At the al-Aqsa mosque compound, the Pope urged people of all religions to "work together for justice and peace".
He then prayed at the Western Wall, which lies just beneath it, bowing his head as he touched the stones.
The pontiff has been feted by Israel and the Palestinians, and has invited their presidents to the Vatican.
Both Israel's Shimon Peres and Palestinian leader Mahmoud Abbas have given a positive response.
'Brothers and sisters'
Pope Francis began the third day of his trip by visiting the compound, considered the third holiest site in Islam.
Known to Muslims as the Haram al-Sharif (Noble Sanctuary) and Jews as the Temple Mount, the status of the site is one of the most contentious issues in the Israel-Palestinian conflict .
Pope Francis took off his shoes to enter the Dome of the Rock, from where Islamic tradition says the Prophet Muhammad ascended to heaven. The Pope then walked to the nearby al-Aqsa Mosque.
Speaking to the Grand Mufti of Jerusalem, the Pope deviated from his prepared remarks to call on Christians, Jews and Muslims to "love one another as brothers and sisters".
"May we learn to understand the suffering of others. May no-one abuse the name of God through violence," he said.
Afterwards, he headed to the Western Wall, one of the holiest sites in Judaism. It is part of the retaining wall of the Temple Mount dating back to a time when a Jewish temple stood there.
The Pope spent a few minutes praying at the wall, as he did on Sunday at the controversial Israeli security barrier that separates the biblical town of Bethlehem in the West Bank from Jerusalem.
He also left a written prayer in a crack in the Western Wall's ancient stones, before embracing two close friends from his native Argentina - an imam and a rabbi - who have been travelling with him.
The Pope then went to Mount Herzl cemetery, where he lay a wreath at the tomb of the founder of modern Zionism, Theodor Herzl.
The BBC's Yolande Knell in Jerusalem says the visit is now part of the protocol for official visitors, but is nevertheless an act of symbolic importance.
Afterwards, the Pope made an unscheduled stop at a memorial for Israeli civilians killed in attacks by Palestinian militants. The move was at the request of Israeli Prime Minister Benjamin Netanyahu, his office said.
Later, the Pope travelled to Yad Vashem, Israel's national Holocaust memorial, where he kissed the hands of several survivors in a sign of honour.
At a solemn ceremony at the Hall of Remembrance, he spoke of the "boundless tragedy of the Holocaust", describing it as an "unfathomable abyss".
"Never again, Lord, never again!" he said. "Here we are, Lord, shamed by what man - created in your own image and likeness - was capable of doing."
Our correspondent says the visit to the memorial holds special significance because of questions over the Vatican's position during the Holocaust.
The Pope then met Israel's two chief rabbis before attending a private audience with President Peres, whom he asked to guarantee pilgrims free access to Jerusalem's holy sites.
Shortly before departing for Rome from Ben Gurion airport, he celebrated Mass at the site known as the Cenacle, where Jesus is reputed to have taken part in the Last Supper with his Apostles on the eve of his crucifixion.
The Cenacle is located in a historic building on Mount Zion that is also sacred to both Jews and Muslims. The reputed burial place of King David is on the ground floor of the Cenacle, while a mosque is situated on the roof.