This huge congregational mosque was built in 879 by Ahmad Ibn Tulun with the intention of accommodating his entire army during Friday prayers. Ahmad was sent to Egypt by the ‘Abbasid caliph in Samarra to serve as its governor, but it seems that he had his own plans. Sensing weakness in Iraq, he declared his independence and began to build a new city, al-Qata'i, northwest of al-Fustat and al-'Askar, the Muslim towns that had grown up north of the Roman fortress of Babylon. Replete with numerous palaces, gardens, and even a hippodrome, al-Qata'i was not destined to survive. When the ‘Abbasids conquered Egypt again, in 970, they razed the entire city as a lesson to future rebels, sparing only the great Friday mosque but leaving it to wither on the outskirts.
In 1293, the emir Lagin hid out in the derelict building for several months while a fugitive from the Mamluk sultan, vowing to restore it if he survived. Three years later, after being appointed sultan himself, he kept his
word, repairing the minaret and adding a fountain in the courtyard, the mihrab, and the beautiful minbar. All of this background is secondary to the building itself—you can delight in this masterpiece without even the slightest knowledge of history. Its grandeur and simplicity set it apart from any other Islamic monument in Cairo.
The mosque is separated from the streets around it with a ziyada (a walled-off space), in which the Friday market was once held and where the famous minaret is located. At the top of the walls a strange crenellation pattern almost resembles the cutout figures that children make with folded paper. Inside, the mosque covers an area of more than 6 acres. Four arcaded aisles surround the vast courtyard. The soffits of the arches are covered in beautifully carved stucco, the first time this medium was used in Cairo. Look for the stucco grilles on the windows, especially those in the qibla wall. The minaret, the only one of its kind in Egypt, is modeled after the minarets of Samarra, with the ziggurat-like stairs spiraling on the outside of the tower.