A gunman opened fire Friday outside a church south of Cairo and at a nearby Christian-owned store, killing at least nine people, including a policeman.
Egyptian authorities said the attacker was shot in an exchange of fire at the Mary Mina Church, a Coptic church in the Helwan district.
Five other people were wounded, including another police officer, Health Ministry spokesman Khaled Megahed said.
The Health Ministry said the shooter had died in the gunfire, while the Interior Ministry said the shooter had been wounded and arrested.
Islamic State militants claimed responsibility for the attack in a statement carried by the group's Amaq news agency.
Investigators said they had identified the gunman and that he had carried out several attacks in the past year. Earlier, Egyptian officials said they were searching for a possible second gunman.
Egyptian President Abdel Fattah el-Sissi offered his condolences to the families of the victims and ordered security forces to increase safety measures around the country.
Police had already increased security around churches ahead of the Coptic Orthodox Christmas on January 7.
In Washington, the White House said U.S. President Donald Trump spoke by phone Friday with Sissi and condemned the attack. It said Trump "reiterated that the United States will continue to stand with Egypt in the face of terrorism."
IS has killed dozens of Christians in church shootings and bombings in the past year.
In May, 28 people were killed when militants opened fire on a bus that carried Coptic Christians who were making their way to the Monastery of Saint Samuel the Confessor in the southern town of Maghagha.
In April, two churches were hit by suicide bombers in Alexandria and Tanta. The attack, during Palm Sunday services, killed at least 43 people, and dozens were wounded.
A bombing at a chapel next to Egypt's main Coptic Christian cathedral in Cairo killed 30 people in December 2016.