Egyptian security forces on Tuesday killed seven militants in a shootout in Cairo, the Interior Ministry said.
The city is under tight security as Egypt’s Coptic Christians start the holy week leading to Easter.
A police officer was also killed in the hours-long firefight that erupted when security troops raided a militant hideout at a residential building in Cairo’s Amireyah district, the ministry said.
Three police agents, including an officer, were wounded.
The ministry said its troops seized weapons and ammunition in the raid.
It said the suspects were planning attacks on the country’s Coptic Christians during the holy week and on Easter Sunday.
Egypt’s Coptic Orthodox Christians, one the world’s oldest Christian communities, will celebrate Easter on April 19.
Pope Tawadros II, their spiritual leader, mourned the death of Lt Col Mohammed El Houfi in the raid.
The country’s chief prosecutor ordered an investigation into the incident.
The ministry said the raid ended about 9pm local time and all militants in the group were killed.
"National security received a tip-off that there was an apartment full of terrorists," a security source told AFP.
"An exchange of gunfire ensued."
Videos on social media showed a building in Al Amireya neighbourhood being surrounded by security forces while a barrage of gunfire could be heard in the background.
Two private TV stations broadcast footage of the shooting and asked people to stay indoors.
The public prosecutor said a team of investigators was sent to the scene in Al Amireya.
Coptic Christians have long complained of persecution and insufficient protection. There have been several deadly attacks against them across the country.
The last major attack, claimed by ISIS, was in November 2018 when gunmen attacked two buses near the Monastery of St Samuel the Confessor, 260 kilometres south of Cairo, killing seven people and wounding 18.
Egypt has been fighting an insurgency that has killed hundreds of police and soldiers in the northern part of the Sinai Peninsula.
The insurgency began after the removal of president Mohammed Morsi of the Muslim Brotherhood in 2013 after mass protests against his rule.
Militants have also carried out attacks elsewhere in the country.