CAIRO -- Pope Francis demanded that Egypt's Muslim leaders teach a rejection of violence in God's name during a delicate visit Friday to the Arab world's most populous country, and he strongly backed its uncompromising crackdown on political Islam and militancy.

Brushing off security concerns after a series of attacks by Islamic militants on Egypt's Coptic Christians, Francis rode through Cairo in a simple blue Fiat with his window rolled down -- not the armoured "popemobiles" of his predecessors.

And at every stop on his first day, he issued variations on the same hard-hitting theme: "No civilized society can be built without repudiating every ideology of evil, violence and extremism that presumes to suppress others and to annihilate diversity by manipulating and profaning the sacred name of God."

Francis strongly backed the government's response to the growing insurgency led by a local affiliate of the extremist Islamic State group, saying Egypt had a unique role in forging peace in the region and in "vanquishing all violence and terrorism."

His main event was a landmark visit to Cairo's Al-Azhar, the revered, 1,000-year-old seat of Sunni Islam learning that trains clerics and scholars from around the world.

There, he warmly embraced Sheikh Ahmed el-Tayeb, Al-Azhar's grand imam who hosted the pope and other senior Muslim and Christian leaders, students and scholars at a peace conference in a hall featuring a mock-up of the famous Al-Azhar mosque, complete with faux windows and flooded with purple lights.

Francis reminded the crowd that Egypt's ancient civilization valued the quest for knowledge and open-minded education, saying a similar commitment is needed today to combat the "barbarity" of religious extremism.

While Al-Azhar has strongly condemned Islamic extremism, Egypt's pro-government media has accused its leadership of failing to do enough to reform religious discourse and purge canonical books of outdated teachings and hatred for non-Muslims.

"As religious leaders, we are called to unmask violence that masquerades as purported sanctity," Francis said to applause. "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."

Religious teachers, in particular, must teach the young to "respond to the incendiary logic of evil by patiently working for the growth of goodness," he said.

El-Tayeb thanked Francis for what he called his "fair" comments against charges of terror and violence levelled against Muslims and Islam.

"We need to cleanse religions from wrong notions, false piety and fraudulent implementations which stoke conflicts and incite hatred and violence," he said. "Islam is not a religion of terrorism because a minority from among its followers hijacked some of its texts" to shed blood and be provided by some with weapons and funds, he said to applause.

The visit was a diplomatic breakthrough for the Vatican after el-Tayeb severed relations with Rome in 2011, when Pope Benedict XVI demanded Egypt better protect its Christian minority following a New Year's Eve church bombing that killed over 20 people.

Francis hosted el-Tayeb at the Vatican last year, and his return visit Friday cemented the renewed relationship.

In addition to Francis' main message of repudiating religiously inspired violence, the two-day visit is also meant to lift the spirits of Egypt's estimated 9 million Christians. Three suicide bombings since December -- including two church attacks on Palm Sunday -- killed at least 75 people. Egypt's Islamic State affiliate claimed responsibility.

President Abdel-Fattah el-Sissi declared a nationwide state of emergency after the Holy Week bloodshed to deal with the insurgency through wider police powers and swift trials. He also created a new state body to fight extremism and terrorism.

Francis strongly backed his stance, saying it "merits attention and appreciation."

"Egypt, in the days of Joseph, saved other peoples from famine; today it is called to save this beloved region from a famine of love and fraternity," he said. "It is called to condemn and vanquish all violence and terrorism."

El-Sissi has had the support of Egypt's Christians in his crackdown. But the general-turned-president has been criticized for human rights violations and was initially shunned by much of the West after ousting the country's first democratically elected president in 2013, the Islamist Mohammed Morsi whose one-year rule proved divisive.

Francis, an Argentine Jesuit, did make a few subtle criticisms, including a demand for "unconditional respect for inalienable human rights such as equality among all citizens, religious freedom and freedom of expression, without any distinction."

"It is our duty to proclaim together that history does not forgive those who preach justice, but then practice injustice," Francis said. "History does not forgive those who talk about equality but then discard those who are different."

That said, Francis' support is likely to embolden el-Sissi, who earlier this month won a coveted White House visit with President Donald Trump.

Human rights activists have denounced el-Sissi for jailing thousands of Morsi supporters, while Christians have long complained of discrimination by the government. Foremost among those complaints is the perceived failure to protect Christians from Muslim extremist attacks in rural areas, the complexities of getting permits to build or renovate churches, and the inaccessibility of top jobs to Christians in certain government branches and security agencies.

In his remarks, the president repeated his denunciation that terrorists cannot claim to be Muslim.

"True Islam does not command the killing of the innocent," el-Sissi said.

Francis later went to the seat of the Coptic Orthodox Church to meet its spiritual leader, Pope Tawadros II.

The two popes and the spiritual leader of the world's Orthodox Christians, Patriarch Bartholomew I, presided at an ecumenical prayer service in St. Peter's Church, where a suicide bombing in December killed 30, most of them women.

Francis bent down and touched a blood-stained wall beneath a memorial to the victims.

"Their innocent blood unites us," he said.

Francis has spoken out frequently about modern martyrs and the "ecumenism of blood" that has united Catholic, Orthodox and other Christians targeted for their faith by Islamic militants.

On Saturday, Francis will celebrate Mass for Egypt's tiny Catholic community and meet with its priests and seminarians before returning to Rome. Local press reports said at least 25,000 were expected at Saturday's Mass.

While Francis did not use the "popemobile," security was visibly tight for his 27 hours in Cairo.

Cars were cleared from streets around the Coptic Orthodox cathedral of St. Mark's in central Cairo and the Vatican Embassy in the upscale neighbourhood on the Nile River island of Zamalek.

Police riverboats patrolled the Nile in front of the embassy. Security men were posted every 100 metres (yards) or so along the 20-kilometre (12-mile) stretch between the airport and central Cairo ahead of his arrival. Armoured cars were stationed in front of the presidential palace.

But the visit appeared to have caused little disruption to the city of 18 million as it fell on the Muslim Friday-Saturday weekend, when the usually congested traffic is much lighter.

------

Associated Press writer Brian Rohan contributed from Cairo.