The Shrine of Imam Al-Shafei is a mausoleum built for Muhammad ibn Idris ibn al-'Abbas ibn 'Uthman ibn Shafi'i, who is also known as Imam Shafi'i. He was born in Gaza in the year 150 AH / 767 CE, and was brought up in Makkah Al-Mukarramah. He studied under the Imam Malik, who owned the Maliki school of Sunni jurisprudence. Later, he developed his own doctrine (Al-Shafi’i).
In 198 AH / 813 CE, Al-Shafi'i moved to Egypt and gave his lessons at the Mosque of Amr ibn al-Aas. Many Egyptian scholars learned from him. He died in the year 204 AH / 819 CE and was buried in the soil of Ibn Abd al-Hakam’s children in al-Qarafa al-Soghra.
During the reign of Salah El-Din El-Ayyubi, the first building was constructed on the tomb of Al-Shafi’i. The current mausoleum was built by the Ayyubid Sultan Muhammad on the site of a former Fatimid mausoleum after his mother was buried there in 608 AH | In AH 1211 / AD 1178, the wooden sarcophagus that tops the soil was completed.
The mausoleum is decorated with geometric fillings engraved in very elaborate inscriptions. The Qur’an verses, the translation of the life of al-Shafi’i, and the name of its maker (Ubayd al-Najjar) are written on it in Kufic and Ayyubid script.
The current wooden dome is one of the renovations made by Sultan Qaytbay in 885 AH / 1480 CE, as well as the mausoleum. Also, Sultan Qansuh al-Ghuri, and the governor of Egypt, Ali Bey the Great, renewed it.
In 2021, the Ministers of Tourism and Antiquities, Endowments, the Governor of Cairo, the Chairman of the Religious Committee of the Parliament, and the Ambassador of the United States of America in Cairo inaugurated the mausoleum dome of Al-Imam Al-Shafi’i after completing the conservation and maintenance project.




