Bethlehem, Occupied West Bank - Pope Francis has stepped into Middle East politics by praying for peace at the Israeli separation wall in Bethlehem, and inviting the Palestinian and Israeli presidents to visit the Vatican following the breakdown of talks between the two sides.

On his second day of a visit to the Holy Land, the pope on Sunday called for Palestinians and Israelis to work together, saying the breakdown in talks between the two sides earlier this year was "unacceptable".

"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 during mass in Manger Square. The offer was accepted by both sides.

He then made the unscheduled stop at the Israeli separation wall, which divides Bethlehem and Jerusalem. The pope prayed for five minutes near an Israeli military watchtower, near graffiti which read, "Pope, we need someone to speak about justice", "Free Palestine" and a reference to the Warsaw ghetto.

Mustafa al-Barghouti, a member of the Palestinian legislative council, said the pope's prayer at the separation wall "will remain in the world's mind forever as a rejection of the apartheid wall".

He also said the pope's travel itinerary, which included going straight from Jordan to Bethlehem rather than through Israel, was "a nod to Palestinian independence".

RELATED: Papal visit sheds light on Christian's plight

The pontiff had earlier made references to Palestinian statehood, and addressed Christians with words of encouragement.

In a short but concise speech made alongside Mahmoud Abbas, the pope called for forging a peace that "rests on the acknowledgment by all of the right of two states to exist and to live in peace and security within internationally recognised borders".

His words reflected long-standing Vatican policy.

Francis' two predecessors spoke of the Palestinians' plight throughout their visits: John Paul reminded the world that the "torment of the Palestinian people has lasted too long" while Benedict spoke of "all the homeless Palestinians who long to be able to return to their birthplace, or live permanently in a homeland of their own".

RELATED: Lebanon patriarch's Israel visit stirs debate

In his remarks, Abbas said he was concerned about stalled talks with Israel and made references to Palestinian and Israeli need for peace and security. He also listed a litany of difficulties affecting Palestinians, including Israeli settlements and prisoners, many of whom have been on hunger strike for more than 30 days in protest at their detention in Israeli prisons.

"Your visit is loaded with symbolic meaning as a defender of the poor and the marginalised," Abbas said, addressing the pope.

The pope flew to Tel Aviv later on Sunday, making a short speech at Ben-Gurion airport. "All of us must become the builders and constructors of this peace,” he said. “All men and women of this land, and the world at large, are asking us to work towards peace.”

Follow Dalia Hatuqa on Twitter: @daliahatuqa