Pope Francis confirmed his reputation for independence with an unscheduled stop to pray conspicuously for four minutes at the imposing Israeli separation wall as he passed through the West Bank city of Bethlehem.
The pope's prayer at a location replete with political significance and controversy came while he was travelling to an open-air mass in Manger Square.
The dramatic gesture was followed with an invitation to the Palestinian president, Mahmoud Abbas, and the Israeli president, Shimon Peres, to join him in Rome to meet and pray together for peace in an unprecedented papal intervention in the troubled peace process.
"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," he said. "I offer my home in the Vatican as a place for this encounter of prayer."
Asked about the invitation, a spokeswoman for Peres said the Israeli president "always accepts any kind of initiative to promote peace".
While Abbas heads the Palestinian government, Peres' presidential post is largely ceremonial.
The pope has said his three-day visit to the Middle East, which began in Jordan on Saturday, had "purely religious" motives, but Palestinians hoped he would show support for statehood, weeks after the collapse of United States-brokered talks with the Israelis.
His route had been planned to pass close by the separation wall. Palestinian officials had hoped he might stop briefly to contemplate the Israeli-built structure, which weaves through the occupied West Bank, but instead the pope stopped his cavalcade, stepped out of the white glass-covered pick-up truck and made his way up to the wall, where he was quickly surrounded by children from the nearby Aida refugee camp.
Approaching the wall, which is close to the main Israeli checkpoint by Rachel's Tomb, the pope put his palm to the towering concrete structure, covered with graffiti appeals to the Palestinian cause, and bowed his head in prayer, flanked by two girls with Palestinian flags.
The heads of Israeli soldiers were visible at the window of a nearby watchtower.
His decision to pray at the separation wall appeared to surprise his entourage. Vatican spokesman Father Federico Lombardi said: "I was not informed before. It was planned by him the day before. It was not on the plan of the trip. It was not a kiss or a blessing. It was a sign of contact, and I think it was very significant way to demonstrate his participation in suffering.
"It was done in a silent praying way, but without words. It was a profound spiritual moment in front of a symbol of division."
His arrival in the West Bank early yesterday marked the start of the second stage of his brief tour aimed at easing an ancient rift with Orthodox Christians and speaking out in favour of regional peace.
Looking tired as he arrived from Jordan by helicopter, the pope received a red-carpet welcome from officials and priests.
After greeting Abbas with a warm embrace at his palace, Francis did not mince words as he called for peace.
"The time has come to put an end to this situation which has become increasingly unacceptable," he said.