Pope Francis pleaded for peace in a visit to Egypt on Friday as he attended a service in solidarity with the embattled Coptic minority at a church bombed by Daesh.
The pontiff walked to the Saint Peter and Saint Paul church in Cairo in a procession led by standard-bearing clergy, after meeting Coptic Pope Tawadros II at his headquarters.
Security forces in the capital were on high alert under a state of emergency following a series of church bombings claimed by IS.
On April 9, the militants bombed two churches in the Arab world's most populous country, killing 45 people in the deadliest attack on Copts in recent memory.
Last December, the Saint Peter and Saint Paul church was itself targeted by a suicide bomber in an attack that killed 29 people.
Francis had earlier met President Abdel Fattah al-Sisi and Ahmed al-Tayeb, the grand imam of the Al-Azhar institution, one of Muslim world's leading authorities, to push for dialogue between the two faiths.
In a speech to a Muslim-Christian conference, the 80-year-old pontiff denounced violence and populism.
"Peace alone... is holy and no act of violence can be perpetrated in the name of God, for it would profane his name," Francis said.
He criticised what he called "demagogic forms of populism... on the rise", saying they were unhelpful to peace.
Francis shuttled from one engagement to another in a closed car under heavy guard on the first day of his tightly scheduled 27-hour trip.
Police and soldiers stood guard outside the Vatican residence in Cairo and armoured cars were stationed outside the Coptic Orthodox Saint Mark's Cathedral, where Tawadros II's headquarters are located.
Francis met the Coptic pope at his offices where the two exchanged gifts.
"Our church and nation has been through a painful experience in the past few months when the sinful hand of terrorism reached out to murder praying innocents," Tawadros said in a speech at the meeting.
"Their innocent blood unites us," Francis said in turn.
They signed an ecumenical agreement to no longer require Catholics to be rebaptised if they choose to become Orthodox, as often happens in Egypt.
He and Tawadros then walked in procession to the Saint Peter and Saint Paul church, where they sat near the altar as a choir sang hymns to clashing cymbals.
Hours before the church visit, Francis became the first Roman Catholic pope to visit the head of Al-Azhar in his Cairo headquarters, sealing a recent improvement in relations between Catholicism and Islam.
In another speech with Sisi in the audience, Francis expressed support for Egypt's military campaign against IS which bombed the churches and has also killed hundreds of police and troops.
But he also insisted on "unconditional respect for inalienable human rights such as equality among all citizens, religious freedom and freedom of expression".
Sisi has faced heavy criticism from rights groups for abuses since he led the military ouster of his Islamist predecessor Mohamed Morsi in 2013.
Pilgrim of peace
Before disembarking from his aircraft in Cairo, Francis had told reporters his visit was a "journey of unity and fraternity. Less than two days but very intense."
His meeting with Tayeb, he said, would "be an example and a model for peace precisely because it will be a meeting of dialogue".
"Please pray for my journey tomorrow as a pilgrim of peace to Egypt," Francis tweeted on the eve of his departure.
Before his visit, some roads had been festooned with posters showing Francis against the backdrop of the Pyramids, with a message that read: "Pope of peace in the Egypt of peace."
John Paul II was the last pope to have visited Egypt in 2000, with his arrival also coming weeks after anti-Christian violence that killed about 20 Copts in January that year.
Vatican dialogue with the Muslim world, a priority for this pope, was set back significantly when Francis's predecessor Benedict XVI made a speech in 2006 in which he was seen as linking Islam to violence.
The now-retired German pontiff's 2011 comments condemning an attack on a Coptic church prompted Al-Azhar to denounce Benedict for meddling in Egypt's affairs.
On Saturday, the pontiff will preside over a mass for the country's small Catholic community, estimated to number around 272,000 spread across various rites.
Egypt's Copts, who make up about 10 percent of the country's population of 92 million, are the Middle East's largest Christian minority and one of the oldest.
But they have suffered attacks throughout the years and many complain that they feel like second-class citizens.