* Pope Francis makes flying visit to Bethlehem
* Pontiff refers to "Palestine", calls for end to conflict
* Francis says prayer next to Israeli security wall (Adds Pope's arrival in Israel)
By Philip Pullella and Noah Browning
BETHLEHEM, West Bank, May 25 (Reuters) - Pope Francis made a surprise stop on Sunday at the wall Palestinians abhor as a symbol of Israeli oppression, and later invited presidents from both sides of the divide to the Vatican to pray for peace.
In an image likely to become one of the most emblematic of his trip to the holy land, 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 paint "Free Palestine". Above his head was graffiti in broken English reading: "Bethlehem look like Warsaw Ghetto", comparing the Palestinians' plight with that of the Jews under the Nazis.
Such imagery seemed likely to cause unease among Israel's leaders, who say the barrier, erected 10 years ago during a spate of Palestinian suicide bombings, is needed to secure 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, just a month after the collapse of U.S.-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 in Bethlehem.
Peres and Abbas both accepted the invitation, their respective staff said. Palestinian official Hana Amira said the encounter would take place on June 6, just under two months before the veteran Israeli leader leaves office.
But it seemed unlikely that Peres would receive any mandate from Israeli Prime Minister Benjamin Netanyahu to negotiate with Abbas on renewing direct talks.
Netanyahu has said Israel would not consider resuming the negotiations unless Abbas reneged on a unity pact with Hamas, one of its most bitter enemies which rules in Gaza. Abbas has said a new government envisaged by the accord would be committed to peace.
From Bethlehem, where the Pope also visited a Palestinian refugee camp, he flew by helicopter to Tel Aviv airport where he was welcomed by Peres and Netanyahu, before flying back over the Judean hills to Jerusalem.
In a speech at the ceremony, Francis invoked "the right of the State of Israel to exist and to flourish in peace and security within internationally recognised boundaries".
At the same time, he said there must be "recognition of the right of the Palestinian people to a sovereign homeland and their right to live with dignity and with freedom of movement".
The Pope also recalled the Holocaust, using the Hebrew word for the term, and said that "ever mindful of the past" there can be "no place for anti-Semitism".
"A particularly moving part of my stay will be my visit to the Yad Vashem Memorial to the six million Jews who were victims of the Shoah," the Argentinian pontiff said. "I beg God that there will never be another such crime, which also counted among its victims many Christians and others."
Peres, welcoming the Pope in blustery, warm sunshine, said: "We are grateful to you for assuming your sensitive and resolute stand against all expressions of anti-Semitism, against all manifestations of racism."
Francis started the day in Jordan and had flown straight to Bethlehem, becoming the first pontiff to travel directly to the West Bank rather than enter via Israel - another nod to Palestinian statehood aspirations.
He later met 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.
Palestinian children held up printed signs in English and Arabic saying "the right of return is our sacred right" and "injustice and oppression must end".
The Vatican has said the main purpose of the three-day papal pilgrimage is to commemorate the 50th anniversary of a historic meeting of Catholic and Orthodox Christian leaders, who moved to end centuries of bitter divisions between the two churches.
In that vein, he was due to hold talks later on Sunday with Patriarch Bartholomew I of Constantinople, the spiritual leader of the world's Orthodox Christians. (Additional reporting by Ali Sawafta in Ramallah and Maayan Lubell in Jerusalem; Writing by Crispian Balmer; Editing by Peter Graff and David Stamp)