BEIRUT (AP) — Pope Benedict XVI appealed Saturday for religious freedom in the Middle East, calling it fundamental for stability in a region bloodied by sectarian strife.

Benedict spoke on the second day of his visit to Lebanon, a country with the largest percentage of Christians in the Middle East. He arrived amid a wave of violent demonstrations over an anti-Islam film across the Muslim world.

“Let us not forget that religious freedom is a fundamental right from which many other rights stem,” he said, speaking in French to government officials, foreign diplomats and religious leaders at the president palace in Mount Lebanon in the southern suburbs of Beirut.

He held up Lebanon, which is still rebuilding from a devastating 1975-1990 civil war largely fought on sectarian lines, as an example of coexistence for the region.

He said Christians and Muslims in Lebanon share the same space — at times in the same family — and asked, “If it is possible in families why not in entire societies?” Marriages where husband and wife are from different religious groups are not uncommon in Lebanon.

He said the freedom to practice one’s religion “without danger to life and liberty must be possible to everyone.”

Enthusiastic crowds lined the streets and cheered along the 30-kilometer motorcade route to the palace as Benedict went by in the bullet-proof glass popemobile. Soldiers in horseback rode ahead of the car.

As the pope arrived in the presidential compound, officials released about 20 white doves.

Just hours after the pope arrived Friday, violence erupted in northern Lebanon over “Innocence of Muslims,” a film that ridicules the Prophet Muhammad, portraying him as a fraud, a womanizer and a child molester.

According to Lebanese security officials, a crowd angry over the film set fire to a KFC and a Hardee’s restaurant in the port city of Tripoli, 50 miles (85 kilometers) north of Beirut, sparking clashes with police. Police then opened fire, killing one of the attackers, the officials said.

At least 25 people were wounded in the melee, including 18 police who were hit with stones and glass. The officials spoke on condition of anonymity because they were not authorized to brief the media.

Lebanese authorities tightened security for the pope, suspending weapons permits except for politicians’ bodyguards and confining the visit to central Lebanon and northern Christian areas.

In the evening, Benedict will address thousands of youths from across the Middle East.

Copyright 2012 The Associated Press.