Pope Benedict XVI ended his three-day visit to Lebanon on Sunday with a call for unity among Christians and Muslims in the Middle East and for peace in neighbouring Syria.

The pontiff landed at Rome's Ciampino airport shortly after 9:30 pm (1930 GMT) and returned to his summer residence in Castel Gandolfo, 30 kilometers south of the Italian capital.

"I hope that Lebanon will fortify the communion among all its inhabitants, whatever their community or religion, and that it will resolutely reject all that could lead to disunity," he said as he departed from Beirut international airport.

He was waved off by Lebanese President Michel Suleiman and Prime Minister Nagib Mikati. Mr. Suleiman thanked the pope for his visit and said: "We pledge to you to keep Lebanon a country of dialogue and openness."

Around 40 per cent of Lebanon's population is Christian while the rest are Muslim.

Earlier, the pope held an open-air mass on Beirut's waterfront, which was attended by some 350,000 people. The pope during his sermon urged Christians to be peacemakers amid the "grim trail of death and destruction" around the world.

"May God grant your country, to Syria and to the West Asia, the gift of peaceful hearts, the silencing of weapons and the cessation of all violence," the Pope said after the mass.

Syria has been gripped by a violent uprising against the regime of President Bashar al-Assad since March 2011. Activists say more than 27,000 people have been killed in the conflict, which has at times spilled over into Lebanon.

The Pope made no reference during his visit to the anti-Islam internet video that has set off violent protests across the Muslim world, including one which resulted in the death of one person and wounding of 25 others in northern Lebanon.

The 85-year-old pope conducted the mass on an altar in the shape of the Cedar of Lebanon - white flowers and olive trees symbolizing peace. Among the congregation were Christian and Muslims officials, including members of the Lebanese Shiite movement Hezbollah. Nawaf al-Moussawi, a Hezbollah parliamentarian, told the Lebanese television station LBC: "Our message is that we want to work together for a Middle East where religions and sects live on the basis of justice that leads to peace."

The head of the Maronite Church, the largest Christian community in Lebanon, Patriarch Bashara al-Rai, said: "The visit offers Christians in the region a sense of safety at a time instability. This visit carries a message of peace that the world and Middle East long for."

Many Christians came from across the West Asia to greet the Pope and attend the mass. "I came to pray for my country, Syria, and to save our homeland," Damascus resident Janette Saliba said.

"I am from Jordan, and I came to pray with his Holiness for peace across the Middle East," Sarah Andoni said.

On Saturday, the Pope met Muslim and Christian leaders as well as foreign diplomats. He appealed to Christians, Jews and Muslims alike to "root out" religious fundamentalism. The Pope had an audience with some 30,000 youth, including Syrians, whom he told that he remembers Syria in his prayers and concerns, along with those in the West Asia who are suffering. The Pope appealed Friday for a stop to arms imports to Syria, saying it would help end the civil war there.

It was his fourth trip to West Asia. The last papal visit to Lebanon was by the late John Paul II in 1997.