Pope Benedict XVI has held an open-air Mass on the seafront of the Lebanese capital Beirut before he returns to Rome after a three-day visit to Lebanon.
Thousands of people were participating in Sunday's Mass at the Beirut City Centre waterfront.
He urged Middle Eastern Christians and Muslims on Sunday to forge a harmonious, pluralistic society in which the dignity of each person is respected and the right to worship in peace is guaranteed.
"In a world where violence constantly leaves behind its grim trail of death and destruction, to serve justice and peace is urgently necessary," Benedict said at the mass.
Speaking to political and religious leaders, he stressed that people must repudiate vengeance, acknowledge their own faults and offer forgiveness to each other.
Thousands of people, mostly Christians and including many children, had lined the road leading to the palace in bright but pleasant morning sunshine, hoping to catch a glimpse of the pope as he headed to the presidential palace.
Among them were Egyptians, Iraqis, Jordanians and Palestinians who came to witness the first papal visit to Lebanon since the late John Paul II came in 1997.
The frail-looking 85-year-old pontiff, walking with the aid of a cane, first met President Michel Sleiman, a Maronite Christian.
Message of peace
Then, before talks with the Muslim leadership, he met Prime Minister Nagib Mikati, a Sunni Muslim, and parliament speaker Nabih Berri, a Shia.
Lebanon has an unwritten but rigorously followed tradition that the three top jobs are always reserved for members of those respective faith communities.
Those who desire to live in peace must have a change of heart, Benedict said, and that involves "rejecting revenge, acknowledging one's faults, accepting apologies without demanding them and, not least, forgiveness".
He said the universal yearning of humanity for peace can only be realised through community, comprising individual persons whose aspirations and rights to a fulfilling life are respected.
Lebanon is a multi-faith country in which Muslims make up about 65 per cent of the population and Christians the balance.
The pope came with a message of peace and reconciliation both to Lebanon and to the wider Middle East, which have been torn by violence, often sectarian, over the years.
"Why did God choose these lands? Why is their life so turbulent?" he asked.
"God chose these lands, I think, to be an example, to bear witness before the world that every man and woman has the possibility of concretely realising his or her longing for peace and reconciliation. This aspiration is part of God's eternal plan and he has impressed it deep within the human heart."
The pope said the conditions for building and consolidating peace must be grounded in the dignity of man.