The Church of Saint Mercurius itself was demolished and turned into a sugarcane warehouse, but was rebuilt by Patriarch Abraham (974–979).[3] Afterwards, in 1080, 47 bishops met in the church by order of the Fatimid vizier Badr Al-Gamal to establish the Coptic canons.[2] A mob burned it to the ground in 1168, but by 1176, it had been rebuilt.[3]