The gunman opened fire on a church south of Cairo on Friday, killing at least nine people before policemen shot him dead, officials and state media said.
The interior ministry said in a statement in the afternoon that it arrested an attacker who attempted to drive through security forces outside the church armed with a machinegun, ammunition and a bomb that he meant to detonate in the church. The Interior Ministry did not explain the reason for the different accounts.
"The security forces frustrated an attack on church in Mar Mina Church the Helwan district", said the interior ministry statement.
There was no immediate claim of responsibility for the attack.
IS had claimed a suicide bombing of a Cairo church in December 2016 followed by bombings of two churches north of the capital in April.
A gunman on a motorcycle opened fire outside the church and at a nearby store, sparking a shootout that killed at least nine people, including eight Coptic Christians, in the latest attack targeting the country's embattled Christian minority. She confirmed the arrest of a second identified gunman involved in the attack.
"The shooting began at 10:30 a.m. and carried on for more than 15 minutes. there was more than one attacker", Mohammed Hussein Abdelhadi, who lives close to the church, told Reuters.
One of the assailants was shot dead, while the other fled, according to initial reports. Police have been stationed outside churches and in nearby streets across Cairo.
The Health Ministry said nine people had been killed yesterday in addition to the gunman, and five were wounded, including two women in serious condition.
The attack came amid tightened security around churches and Christian facilities ahead of the Coptic Orthodox Christian celebrations of Christmas on January 7.
President Abdel Fattah al-Sisi offered his condolences to the families and ordered security forces to increase safety measures at sensitive sites, his office said in a statement.