can be seen in the background.
Overview The Citadel was built on a promontory beneath the
Muqattam Hills, a setting that made it difficult to attack. The efficacy of the Citadel's location is further demonstrated by the fact that it remained the heart of Egyptian government until the 19th century. During this long period, the layout and structure of the Citadel was repeatedly altered and adapted to suit the designs of new rulers and new regimes, which makes it difficult to reconstitute its original plan or even its plan in subsequent periods. There have been three major construction periods leading to the Citadel's current form: 12th-century
Ayyubid (starting with
Saladin), 14th-century
Mamluk (under
al-Nasir Muhammad), and in the 19th century under
Muhammad Ali. The Citadel stopped being the seat of government when
Egypt's ruler,
Khedive Ismail, moved to his newly built
Abdin Palace in the new
downtown Cairo in 1874. Despite its elaborate defenses, the Citadel never ended up being subjected to a true siege, though it was involved on various occasions in the political conflicts within Cairo or Egypt. The Citadel was begun by the
Kurdish Ayyubid ruler Salah al-Din (
Saladin) between 1176 and 1183 CE in order to protect Cairo from potential
Crusader attacks and to provide a secure center of government for his new regime (only a few years after he had dismantled the
Fatimid Caliphate). This also emulated a feature of many Syrian cities, such as
Damascus and
Aleppo, which had walled citadels that acted as the seat of power and which Saladin was familiar with. Saladin charged his chief eunuch and close confidant,
Baha al-Din Qaraqush, with overseeing the construction of the new fortifications. Most of the structure was built with limestone quarried from the surrounding Muqattam Hills; however, Qaraqush also quarried a number of minor pyramids at
Giza and even as far away as
Abusir in order to obtain further materials. The eagle's heads are missing today, but their original appearance was noted by chroniclers. Only one original gate,
Bab al-Mudarraj, has survived to the present day. It is located along the walls of the Northern Enclosure, nowadays between the Harem Palace (National Military Museum) and the newer
Bab al-Jadid gate. It was originally the main gate of the Citadel, but today it is obscured by later constructions from
Muhammad Ali's time, including the
Bab al-Jadid ("New Gate"). (During excavations the mosaics were removed for study and restoration. He also commissioned new palaces outside the Citadel but nearby for his favourite
amirs, and his projects encouraged the development of areas near the Citadel, such as
al-Darb al-Ahmar. Likewise,
Sultan Hasan (another son of al-Nasir) built a lavish domed palace known as the ''Qa'a al-Baysariyya'', which was completed in 1360. It was over 50 metres tall and, in addition to a main hall covered by a dome, it also had a tower with an apartment for the sultan which was decorated with ivory and ebony. The first mosque built in the Citadel after the Mamluk period was the
Mosque of Sulayman Pasha in the Northern Enclosure, built by the Ottoman governor in 1528 for use by the Janissaries. This
Ottoman-style mosque was built in memory of
Tusun Pasha, Muhammad Ali's second son who died in 1816. However, it also represents Muhammad Ali's efforts to erase symbols of the Mamluk legacy that he sought to replace. Many of the former Mamluk structures, including the Great Iwan and the Ablaq Palace of al-Nasir Muhammad, were demolished in 1825 to make way for his new mosque and its renovated surroundings. == Water supply system ==