or Copts. Shrines and mausoleums Islamic Cairo is also the location of several important religious shrines such as the al-Hussein Mosque (whose shrine is believed to hold the head of Husayn ibn Ali), the Mausoleum of Imam al-Shafi'i (founder of the Shafi'i madhhab, one of the primary schools of thought in Sunni Islamic jurisprudence), the Tomb of Sayyida Ruqayya, the Mosque of Sayyida Nafisa, and others. Some of these shrines are located within the vast cemetery areas known as the City of the Dead or al-Qarafa in Arabic, which adjoin the historic city. The cemeteries date back to the foundation of Fustat, but many of the most prominent and famous mausoleum structures are from the Mamluk era. Walls and gates Fatimid and Ayyubid Walls When Cairo was founded as a palace-city in 969 by the Fatimid Caliphate, Gawhar al-Siqilli, a Fatimid general, led the construction of the city's original walls out of bricks. Later, during the rule of the eighth Fatimid caliph, the vizier, Badr al-Gamali, funded an effort to rebuild the walls out of stone and further outward than before to expand the space within Cairo’s walls. The architectural elements of the walls were informed by Badr al-Gamali’s Armenian background, and were innovative in the context of Islamic military architecture in Egypt. The walls are composed of three vertical levels. The lower level was elevated above the street and contained its gate’s entrance halls which were accessible by ramps. The second level contained halls that connected different galleries and rooms. The third level was the terrace level, protected by parapets, where, near gates, belvederes were built for the caliph and his court to use. Many gates existed along the walls of Fatimid Cairo, but only three remain today: Bab al-Nasr, Bab al-Futuh, and Bab Zuwayla (with "Bab" translating to "gate"). A restoration project from 2001 to 2003 successfully restored the three gates and parts of the northern wall between Bab al-Nasr and Bab al-Futuh. After the Fatimid period, the founder of the Ayyubid dynasty, Saladin, planned to extend the walls of Cairo to include more of the city and also to enclose Fustat to the south. The Ayyubids successfully extended the walls near Cairo southward but Saladin died before they began the walls that would enclose the other city, so this portion of the design was never realized. Fatimid and Ayyubid Gates Bab al-Nasr and Bab al-Futuh are both