The Mosque of al-Hakim bi-Amr Allah is the fourth oldest mosque in Egypt, and the second largest after the Mosque of ibn Tulun. The construction of the mosque was begun by al-Hakim’s father, the Fatimid Caliph al-Aziz bi Allah in 380 AH/990 AD, but he died before its completion, leaving his son to finish it in 403 AH/1013 AD. The mosque is located at the end of al-Muizz Street in al-Gamaliya district, near Bab al-Futuh. Originally, the mosque was constructed outside the walls of the city commissioned by the Fatimid Vizier Jawhar al-Siqilli, and was later incorporated into the walls that built by Badr al-Din al-Jamali (480 AH/1078 AD).
The main entrance lies on the western facade of the mosque, and is monumental in size and design. It is one of the oldest architectural examples of projecting entrances, and was influenced by the great Mosque of Mahdiya in Tunis. The mosque once served as a Shiite center in Egypt, operating as al-Azhar Mosque did in the Fatimid period.
The plan of the mosque consists of a triangle with four arcades centering a courtyard. Two minarets flank either side of the façade. The mosque has undergone several restoration phases throughout the years.
The mosque has a long and intriguing history, including its role as a barracks during the French campaign, when its minarets were utilized as watch-towers. Its qibla arcade was used as a museum of Islamic art called the House of the Arab Antiquities.