Relatives of killed Coptic Christians grieve as they gather during the funeral at Abu Garnous Cathedral in the north Minya town of Maghagha (AFP)
A gunman opened fire on a church south of Cairo on Friday and was shot dead by policemen, police officials said.
The gunman had opened fire outside the church, wounding five security guards, and tried to storm the building when police shot him dead, the officials said.
A picture of the alleged gunman's corpse published on the official Al-Ahram newspaper's website showed a bearded man wearing a bulky ammunition vest sprawled on a street.
Local media cited the Interior Ministry as saying two policemen had been killed in the attack on the Mar Mina church.
Cairo's security chief headed for the scene. Sirens were heard in central Cairo as the incident was first reported.
The Islamic State group's affiliate in Egypt has killed dozens of Christians in church bombings and shootings over the past year, and has threatened further attacks against the minority.
Egypt's Coptic Christians make up about 10 percent of the country's 93 million people, and are the largest religious minority in the region.
Speaking to Middle East Eye on the eve of Christmas, former Archbishop Emeritus of Algiers Henri Teissier implored Middle Eastern Christians not to leave their historic homeland in the face of militant attacks.
"We hope that the current crises will not drive our Christian brethren out of their homes, out of the countries that are their native lands," he said.
"Christians were in the Middle East seven centuries before the Muslims. A Lebanese Christian is also a Lebanese citizen. The Copts are the direct descendants of the ancient Egyptians."