CAIRO — Egypt said Sunday that security forces have killed 19 militants in a shootout, including the gunmen suspected of killing seven Christians in an attack on pilgrims traveling to a remote desert monastery.

The Interior Ministry, which oversees the police, said the militants were tracked to a hideout in the desert west of the central province of Minya, the site of Friday's attack, which also left 19 people wounded.

It said the alleged militants opened fire when they realized they were being besieged by security forces. It did not say when the shootout took place or explain how it had determined that the perpetrators of Friday's attack were among the 19 killed.

The ministry published photographs purporting to show the bodies of the slain militants, as well as rifles, shotguns and pistols. Other images showed the inside of a tent with the black banner of the Islamic State group — which claimed responsibility for Friday's attack — unfurled on the ground.

An IS affiliate centered in the Sinai Peninsula has repeatedly targeted Christians, in part over their support for President Abdel-Fattah el-Sissi.

El-Sissi led the 2013 overthrow of an elected but divisive Islamist president and has since waged a sweeping crackdown on dissent, jailing thousands of Islamists and other activists.

Friday's attack was the second in as many years to target pilgrims on their way to the monastery of St. Samuel the Confessor, after a May 2017 assault left 29 dead.

Christians make up about 10 percent of Egypt's 100 million people and have long complained of discrimination. They have accused police of negligence after this and other attacks, and say authorities often go easy on Muslim assailants after outbreaks of sectarian violence.

They have found a measure of protection under el-Sissi which, according to Christian activists, did not extend to members of the ancient community in rural regions where radical Muslims whip up anti-Christian sentiments, often over the construction or restoration of churches or romantic relationships between Christians and Muslims.

Pope Francis on Sunday decried the attack and invited the faithful in St. Peter's Square to pray with him for the seven people killed on Friday. He said he was praying for the "pilgrims killed for the sole fact of being Christians," asking that those grieving be comforted.

Addressing a meeting of youths in the Red Sea resort city of Sharm el-Sheikh, el-Sissi on Sunday sought to send out a message of reconciliation. He said Friday's attack pained all Egyptians, adding that his rule has been more tolerant of minorities than that of his predecessors.

"The state now is tasked with building churches for its citizens, because they (Christians) have the right to worship," he said, alluding to a 2016 law that, in theory, regulates the construction of churches and mosques without bias. "If followers of other religions lived in Egypt, we would have built places of worship for them too."