In an image set to become one of the most emblematic of his trip to the holy land, a sombre-looking Francis rested his forehead against the concrete structure that separates Bethlehem from Jerusalem, and prayed silently as a child holding a Palestinian flag looked on.
He stood at a spot where someone had sprayed in red "Free Palestine". Above his head was graffiti in English reading: "Bethlehem look like Warsaw Ghetto", comparing the Palestinian plight with that of the Jews under the Nazis.
Israel says the barrier, erected 10 years ago during a spate of Palestinian suicide bombings, is needed for its security. Palestinians see it as a bid by Israel to partition off territory and grab land they want for their future state.
On the second leg of a three-day trip to the Middle East, Francis delighted his Palestinian hosts by referring to the "state of Palestine", giving support for their bid for full statehood recognition in the face of a paralysed peace process.
But, speaking at the birthplace of Jesus in the Palestinian-run city of Bethlehem in the Israeli-occupied West Bank, he made clear that a negotiated accord was needed, calling on leaders from both sides to overcome their myriad divisions.
Francis invited the Israeli and Palestinian presidents to come to the Vatican to pray for an end to the enduring conflict, a month after the collapse of US-backed peace talks.
"In this, the birthplace of the Prince of Peace, I wish to invite you, President Mahmoud Abbas, together with President Shimon Peres, to join me in heartfelt prayer to God for the gift of peace," the Pope said at an open-air Mass.
A spokeswoman for Peres said that the president "always accepts any kind of initiative to promote peace". While Abbas heads the Palestinian government, Peres's post is largely ceremonial and he is due to leave office in July.
Francis flew by helicopter to Bethlehem from Jordan, where he started his tour on Saturday, becoming the first pontiff to travel directly to the West Bank rather than enter via Israel - another nod to Palestinian statehood aspirations. He was due to travel to Israel later in the day for a swirl of meetings, with some 8000 police deployed in Jerusalem to guarantee his security.
Israeli police said they arrested 26 people who took part in a protest early yesterday by Jewish nationalists at the Cenacle in Jerusalem, the site of Jesus's Last Supper, where Francis is due to hold a Mass today.
Protesters say the authorities are preparing to hand the Church the site, where some Jews believe King David is buried. The Israeli government has denied any such deal.
Israel blames the Palestinian president for the failure of the latest peace talks, but standing alongside Abbas, Francis referred to him as "a man of peace and a peacemaker".
Although the Vatican said the purpose of the visit was religious, political overtones were present. A mural behind the altar at the Bethlehem Mass showed Jesus, who was a Jew, swaddled in a Palestinian keffiyeh, with his father, Joseph, also wearing the black and white headdress. Pictures equating Palestinian suffering with that of Christ dotted the city.
The Pope was later to meet refugees at a camp set up after the 1948 creation of Israel, when hundreds of thousands of Palestinians fled, or were forced to abandon their homes.
To avoid a diplomatic tangle, Francis will fly to Tel Aviv airport for a welcoming reception from Israeli leaders, rather than drive the short distance to Jerusalem.
Israel calls Jerusalem its eternal and undivided capital, having annexed Arab neighbourhoods seized in the 1967 war, including the Old City, the site of the main religious shrines. The rest of the world has not recognised the annexation.
From Tel Aviv, he will fly to Jerusalem to commemorate the 50th anniversary of a historic meeting of Catholic and Orthodox Christian leaders, who moved to end centuries of divisions between the churches.