Francis' trip comes three weeks after ISIS killed at least 45 people in attacks on two Egyptian churches. He has used the visit to launch a strong appeal for religious freedom and to accuse terrorists of distorting the nature of God.
After a dense first day of meetings with political and religious leaders, the highlight on Saturday was a Mass in the Air Defence Stadium, where Vatican officials said 15,000 people gathered, among them Coptic bishops and senior Anglican figures.
Crowds arrived early, waving Egyptian and Vatican flags and braving intense security measures to welcome Francis, who toured the sun-drenched stadium in a golf buggy to the sound of hymns performed by a choir and orchestra.
He blessed Egypt as one of the earliest nations to embrace Christianity and repeated his plea for tolerance.
"True faith leads us to protect the rights of others with the same zeal and enthusiasm with which we defend our own," he told the crowd in the heavily guarded arena.
"The only fanaticism believers can have is that of charity. Any other fanaticism does not come from God and is not pleasing to him," he said in his homily.
In a series of speeches during his two-day stay, the pope has delivered his bluntest denunciations yet against religious violence, and has appeared to endorse Egyptian President Abdel Fattah al-Sisi's campaign against terrorists.
However, he nuanced his message by lamenting the rise of "demagogic forms of populism" - a possible reference to right-wing nationalist parties in Europe pushing anti-immigrant and anti-Muslim agendas.
He also defended human rights - which non-governmental organisations have accused Sisi's administration of abusing.
"History does not forgive those who preach justice, but then practice injustice," he said in a speech on Friday, sharing the stage with Sisi, who warmly applauded his words.
The unusual choice of venue for Saturday's religious service highlights the security concerns surrounding the trip.
Helicopter gunships circled the perimeter of the stadium and armoured military vehicles patrolled the streets of the Egyptian capital on Saturday. Police in white uniforms were positioned every few metres (yards) on a Nile bridge that the pope crossed.
The 80-year-old pope himself declined the use of an armoured limousine, preferring instead to travel in an ordinary Fiat car with its window wound down so he could be closer to onlookers.
Francis had lunch with Egyptian bishops and was later leading prayers at a Catholic seminary in the south of Cairo before heading back to Italy in the late afternoon.
The visit was the first by Francis to Cairo but the second by a Catholic pope. Pope John Paul II came to Egypt in 2000, a year before the September 11 attacks on the United States that convulsed Western relations with the Muslim world.
Egypt's Christians comprise 10 percent of the 92 million population, making them the largest Christian community in the Middle East. Most Egyptian Christians are Coptic Orthodox, while barely 200,000 are members of Churches within the Roman Catholic fold.
While Egypt has escaped the sort of sectarian violence that has decimated ancient Christian communities in Syria and Iraq, it is under threat from ISIS who launched a campaign in December to wipe out Egypt's Christians, carrying out three church attacks that have killed more than 70 people.
The campaign presents a challenge for Sisi, who has vowed to crush terrorist and is fighting in North Sinai, where ISIS have forced hundreds of Copts to flee.
Sisi, who declared a three-month state of emergency after the Palm Sunday church attacks, appealed for more international cooperation to combat terrorism when he met Francis on Friday.
(Writing by Crispian Balmer and Lin Noueihed, Editing by Giles Elgood)
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)