Christians believe that Bethlehem, in the occupied West Bank, was the birthplace of Jesus.
Benedict's tour of Jordan, Israel and the Palestinian territories was aimed at improving the Roman Catholic church's relations with Muslims and Jews following a string of controversial actions and comments.
But his remarks on Friday sought to address the political divisions between Israelis and Palestinians.
"Let it be universally recognised that the state of Israel has the right to exist, and to enjoy peace and security within internationally agreed borders,'' Benedict said.
"Let it be likewise acknowledged that the Palestinian people have a right to a sovereign independent homeland. Let the two-state solution become a reality, not remain a dream,'' he said.
To both sides he urged: "No more bloodshed! No more fighting! No more terrorism! No more war!"
In the final act of worship of his visit, Benedict preached a message of hope for all mankind at the Church of the Holy Sepulchre.
"The bitter fruits of recrimination and hostility can be overcome and ... a future of justice, peace, prosperity and co-operation can arise," he said in the ancient church, which believers say marks the site of Jesus' crucifixion, burial and resurrection.
Before the pilgrimage, many Israelis had been angered over Benedict's decision to readmit to the Catholic church a bishop who had denied the extent of the Holocaust.
While Benedict strongly condemned the mass killing of Jews by the Nazis during a visit to the Yad Vashem Holocaust memorial, calling it an "appalling chapter of history [that] must never be forgotten or denied", for some who were expecting an apology, it was not enough.
Neither did he discuss what some see as the church's lack of opposition to the genocide or his own time as a member of the Hitler Youth movement.
Jacky Rowland, Al Jazeera's correspondent in Jerusalem said that Benedict had made more progress in addressing the concerns of the Muslim world than the Jewish world.
"Muslims were waiting to hear an apology for remarks from a speech in Germany in 2006 when the pope appeared to compare Islam in some way to violence.
"There wasn't any clear apology but he made so many remarks in favour of the Palestinian cause, calling for the blockade of Gaza to be lifted and the critical remarks about the separation wall, the Muslim community is inclined to forgive him.
"Where the visit underplayed expectations was with regards to building bridges with the Jewish community again.
"The pope didn't address any of the controversies. He did denounce anti Semitism ... which in some way has repaired relations with the Jewish world but it wasn't the high moment of reconciliation that some were expecting."