Pope Francis is greeted by Muslim clerics during a visit to the prestigious Sunni institution al-Azhar in Cairo on April 28. (Thomas Coex/AFP/Getty Images)

Pope Francis urged Muslim leaders Friday to reject extremist violence in God’s name and preach messages of tolerance, delivering a powerful call for action at a time when Islamist militants are persecuting Christians across the region.

He arrived on his two-day visit, intended to show solidarity with embattled Christians as well as improve ties with Muslim leaders, amid acute fear and uncertainty among Egypt’s minority Christian community.

Since December, Islamic State militants have bombed churches, staged assassinations and driven hundreds of Christian families from their homes. Less than three weeks ago, suicide bombings at two churches in the cities of Alexandria and Tanta killed more than 40 people and injured scores during Palm Sunday services.

“We have an obligation to denounce violations of human dignity and human rights, to expose attempts to justify every form of hatred in the name of religion, and to condemn these attempts as idolatrous caricatures of God,” Francis told a gathering of religious leaders at a peace conference hosted by the grand imam of al-Azhar, Egypt’s highest Islamic authority.

“Let us say once more a firm and clear “No!” to every form of violence, vengeance and hatred carried out in the name of religion or in the name of God.”

Only the second pope to visit Egypt, the most populous nation in the Arab world, the 80-year-old pontiff arrived on Friday afternoon amid heavy security concerns. In both church attacks this month, the suicide bombers managed to penetrate sites that were guarded by security forces.

Security was visibly tight Friday. Police officers and soldiers in armored personnel carriers secured streets and sites the pope was to visit, including the Coptic Orthodox Cathedral and the Vatican Embassy. Police in riverboats patrolled the Nile around the island of Zamalek, where the embassy is housed.

Nevertheless, Francis declined to ride in an armored car, preferring instead a blue Fiat car with its windows down. But security forces prevented crowds from gathering to see the pontiff as he drove through the streets of Cairo.

Christians make up about 10 percent of Egypt’s population of 95 million. The vast majority are Orthodox Coptic Christians; Catholics make up less than 1 percent of the community’s population.

After being greeted at Cairo’s international airport by religious and political leaders, Francis traveled to the presidential palace in the upscale neighborhood of Heliopolis to meet with President Abdel Fatah al-Sissi.

In a speech in front of Sissi and diplomats, Francis expressed support for Egypt’s efforts to suppress the Islamic State’s Egyptian affiliate, based in the northern Sinai Peninsula. The country today has an important regional role to play in “vanquishing all violence and terrorism,” he said. Sissi’s effort to tackle religious extremism, the pontiff said, “merits attention and appreciation.”

Pope Francis boards a plane to Egypt at Fiumicino airport near Rome on April 28, 2017. (Telenews/EPA)

Sissi, in turn, told the pontiff that Egypt was “determined to defeat” terrorism and “to hold onto our unity and not let it divide us.”

Bringing security to Egypt is a key promise of Sissi, but the recent assaults on Christians have posed serious challenges to his abilities to fulfill it. Most Christians backed Sissi’s rise to power, as well as his brutal crackdown on the Muslim Brotherhood, a moderate Islamist party. In 2013, Sissi led a military coup that ousted elected Islamist President Mohamed Morsi and his Muslim Brotherhood supporters from office.

Since then, attacks on Christians have risen dramatically, especially in rural areas, according to data compiled by activists. The violence added to Christians’ sense of feeling under siege, even as they coexist with Muslims. For decades, Christians have faced discrimination by successive governments that have restricted them from freely practicing their beliefs.

But the community now faces greater harm from the Islamic State, which in February declared that killing Christians was a focus of its campaign to destabilize Egypt. In December, the group asserted responsibility for a bombing at the Coptic Cathedral complex, killing more than two dozen worshipers, most of them women and children.

On Friday, Francis visited the now heavily guarded site in part to pray for those who died.

In February, hundreds of Christians fled the Sinai Peninsula following assassinations by Islamic State militants. After this month’s church bombings, Sissi declared a state of emergency. Yet last week, the Islamic State attacked security forces near St. Catherine’s Monastery, one of the world’s oldest, killing a police officer and injuring three others.

The central focus of the pope’s visit Friday was the peace conference and meeting his host, Sheikh Ahmed al-Tayeb, the grand imam of al-Azhar, a 1,000-year-old mosque and university revered by Sunni Muslims.

Before a crowd of Muslim and other religious leaders, scholars and students, Francis said a serious commitment was needed to educate youth and prevent them from being enticed by religious extremists.

“As religious leaders, we are called to unmask violence that masquerades as purported sanctity,” Francis, dressed in his white papal frock and cap, told the crowd. “To counter effectively the barbarity of those who foment hatred with violence, we need to accompany young people, helping them on the path to maturity and teaching them to respond to the incendiary logic of evil by patiently working for the growth of goodness.”

In 2011, relations soured between the Roman Catholic Church and Muslim clerics here after then-Pope Benedict XVI denounced a church bombing in Alexandria and urged Egypt’s leaders to do more to protect Christians. Francis has tried to improve relationships since becoming pope and last year hosted Tayeb at the Vatican.

In his address, Tayeb praised Francis for disassociating terrorism from Islam. “Islam is not a religion of terrorism because a minority from among its followers hijacked some of its texts,” he said.

Both he and Francis called for cutting off the militants’ funding and weapons.

After their speeches, both men hugged and kissed each other’s cheeks.

For Mustafa Mohammed, a religious student at al-Azhar who was in the audience, the symbolism was clear.

“It is a message to the extremists that Muslims and Christians will never be torn apart,” he said.

Heba Mahfouz contributed to this report.