The blaze, blamed on an electrical fault, hit the Abu Sifin church in densely populated Imbaba, a working class district west of the Nile River, part of Giza governorate in greater Cairo.
Witnesses described panicked scenes as people rushed into the multi-storey building to rescue those trapped but were soon overwhelmed by the heat and deadly smoke.
“Everyone was carrying kids out of the building,” said Ahmed Reda Baioumy, who lives next to the church.”But the fire was getting bigger and you could only go in once or you would asphyxiate.”
Another witness, Sayed Tawfik, said: “Some threw themselves out of windows to escape the fire.” He pointed to a car bearing dents “left by a person who is now lying in the hospital with a broken arm and back.”
A resident of the area, Mina Masry, said emergency services were slow in responding.
Ambulances took “over an hour to arrive” and fire trucks “nearly an hour, though their station is five minutes away.”
Masry added: “If the ambulances had come on time, they could have rescued people.”
The Egyptian Coptic Church and the health ministry reported 41 dead and 14 injured in the blaze before emergency services said they had brought the blaze under control.
Copts are the largest Christian community in the Middle East, making up at least 10mn of Egypt’s 103mn Muslim-majority population.
The interior ministry said “forensic evidence revealed that the blaze broke out in an air-conditioning unit on the second floor of the building” which also houses social services.
Father Farid Fahmy, of another nearby church in Imbaba, said a short circuit caused the fire.
“The power was out and they were using a generator,” he said.”When the power came back, it caused an overload.”
In the morning, President Abdel Fattah al-Sisi said on his Facebook page that he had “mobilised all state services” in response.
He later said he had “presented his condolences by phone” to Pope Tawadros II, the head of the Coptic Orthodox Church.
The Giza governor ordered “urgent aid of 50,000 pounds (around $2,600) for the families of the deceased and 10,000 pounds for the injured”.
The grand imam of Al-Azhar, Egypt’s foremost Muslim institution, expressed his condolences for “the tragic accident” and affirmed “the readiness of Al-Azhar hospitals to receive the injured”.
Accidental fires are not uncommon in the sprawling megalopolis of Cairo, where millions live in informal settlements.
Baioumy, the neighbour, said firefighters were hampered by the church’s location “on a very narrow street”.
Egypt, with its often dilapidated and poorly maintained infrastructure, has suffered several deadly fires in recent years.