# Mosque of Sultan al-Muayyad

The Mosque of Sultan al-Mu'ayyad (Arabic: مسجد السلطان المؤيد) is a Mosque in Cairo, Egypt next to Bab Zuwayla built under the rule of sultan Al-Mu'ayyad Sayf ad-Din Shaykh from whom it takes its name, "Al-Mu'ayyad", meaning The Supporter in Arabic language. Construction began in 1415 and the mosque was completed in 1421. The complex included a Friday mosque and a madrasa for four madhhabs. It replaced a prison which originally stood next to Bab Zuwayla.

## History
### Sultan al-Mu'ayyad

In keeping with Mamluk custom, al-Mu’ayyad Shaykh was purchased by Sultan Al-Malik Az-Zahir Sayf ad-Din Barquq when he was ten or twelve years old. As an adult, he served for ten years as the governor of Tripoli under an appointment by Sultan An-Nasir Naseer ad-Din Faraj.
The historian Al-Maqrizi relates the future Sultan al-Mu'ayyad was imprisoned in the same prison which the mosque replaced as while an emir under Sultan Faraj. Shaykh suffered so terribly from fleas and lice during his imprisonment, he vowed that he would transform the prison into "a saintly place for the education of scholars" if he ever came to power. True to his word, when he became Sultan he commissioned the mosque.
In 1412, Shaykh assisted in overthrowing Sultan Faraj, and within six months, he seized power and became the new Sultan. He took the title al-Mu'ayyad and began to expand his empire through battles against neighboring territories. As sultan, al-Mu'ayyad led a number of successful campaigns to northern Syria, as well as fighting Turkoman neighbors in Anatolia. He advanced as far as Konya before having to return to Cairo. Sultan al-Mu'ayyad's reign was plagued by troubles: the Bubonic plague, currency devaluation, and rebellious bedouins all disturbed his reign. Despite this, the Sultan still managed to oversee the building of the mosque, which is recognized today as one of Cairo's signature landmarks.
Under the sultan's sponsorship, the madrasa within the mosque became one of the most prominent academic institutions Cairo in the fifteenth century. The lavish endowment left by the sultan upon his death allowed the madrasa to hire the most eminent scholars of the day as professors. The most famous Quranic specialist in Egypt, Ibn Hajar al-'Asqalani, lectured in Shafi'i jurisprudence at the madrasa.
Sultan al-Mu'ayyad Shaykh died in 1421, eleven years after he took power. Throughout his reign, he gained a reputation as a humble man and as one of the great patrons of architecture in Cairo. On his death, the sultan left behind several religious and secular monuments, including a khanqah in Giza, palaces along the Khalij canal and the Nile, and the Mosque of Sultan al-Mu'ayyad.

### Construction

Construction of the mosque began in May 1415. The project was an ambitious one, costing the sultan 40,000 dinars between commencement and completion. According to al-Maqrizi, thirty builders and one hundred workers labored on the structure over seven years. The mosque required such a large quantity of marble that some of it was harvested from pre-existing structures. Besides marble, many other parts of the mosque were cannibalized from other buildings, including the mosque's columns and a beautiful bronze door and chandelier. The door and chandelier are particularly famous instances of this; both are said to have come from the Mosque-Madrassa of Sultan Hassan. Removing parts of current mosques was illegal while the Mosque of Sultan al-Mu'ayyad was being built, so taking the door and chandelier were tantamount to stealing, despite donations the Sultan made to the old mosque. Although the new mosque was not officially completed until 1422, an inaugural celebration was held in November 1419 to celebrate the new building.
Even after the official conclusion of the mosque's construction, a number of structures in the original plans were never built. The dome of the second mausoleum attached to the mosque was never completed. A separate building for use as dormitories by Sufi students who studied at the madrasa were not immediately erected, despite an allocation of 20,000 dinars toward them. Later mosque records are unclear as to whether the Sufi dormitories were later completed as plans, though the students definitely were given space in which to live.

### Purpose

The mosque was intended as a funerary complex and for use in Friday prayers, but its greatest purpose was that of a madrasa for Sufi students, according to al-Maqrizi's story of its origins. The madrasa was devoted to the study of the Hanafi, Shafi'i, Maliki, and Hanbali schools of Sharia law. According to the mosque's original documents, the madrasa was to house fifty Hanafis, forty Shafi'is, fifteen Malikis, and ten Hanbalis, and their respective teachers and imams. There were also two classes of twenty students each for students of tafsir and Hadith, and two others of ten each for students of the Quran recitation and legal studies, according to the Hanafi jurist al-Tahawi.

## Architecture and Appearance
### Exterior

The Mosque of Sultan al-Mu'ayyad was the last great hypostyle mosque built in Cairo. Originally it had four facades and entrances. Over time, the mosque fell into disrepair, and today only the eastern facade and the prayer hall are original to the mosque. Much of what can be seen today has been restored over the past two hundred years and is not necessarily how the mosque originally looked.
In order to build the mosque, a portion of the Fatimid wall which used to surround Cairo had to be demolished; however, an old section of the wall was recently discovered within the mosque's structure and can be seen today by visitors. The two towers of the nearby gate of Bab Zuweila, set in the original wall, were saved from demolition and serve as the base of the mosque's two remaining minarets; an unusual and unique feature of this mosque complex.
The main portal, or muqarnas is set in a pistaq, or rectangular frame, that rises above the mosque's facade. This was the last grand portal built in the Mamluk period; it is framed with to the mosque is decorated with finely carved marble bands and kufic calligraphic script. The marble was carved in a geometric pattern and decorated by polychromatic stones and colored stucco in high relief. The main door is a masterpiece of bronze work taken from the Mosque-Madrassa of Sultan Hassan, while the dome is a typical example of Mamluk stone masonry with a cylindrical base and carved zig-zag pattern. The original facades were particularly tall for the period, due to the extra height added by the Fatimid towers at the base of the minarets. The facades were decorated with two rows of windows, and shops beneath each wall of the mosque were added in the original plans and remain today. The shops attached to and around the mosque play an important role in the mosque's upkeep, as a percentage of their earnings go toward maintaining the building and its staff.
Originally, the mosque was intended to include a symmetrical pair of domed mausoleums flanking a prayer hall; this ambition was curbed when the dome of the second mausoleum was not completed. On either side of the prayer hall are funerary chambers, housing the Sultan and his son in one and female members of the Sultan's family in the other. The Sultan's chamber has a domed ceiling, as originally planned, while the women's chamber has a plain flat ceiling. This dome is a reduced copy of Faraj's twin domes; because of the large size of the mosque, the dome appears disproportionately small in its setting.

### Interior

The sanctuary of the mosque was one of the most richly decorated of its time; wall decoration was limited to the prayer hall, which was decorated with polychromatic marble high enough to include window and mihrab recesses. The marble columns are pre-Islamic and have diverse sizes and shapes, since they were drawn from structures across Cairo and the surrounding territories. Floors were paved with polychrome marble in the sanctuary and courtyard, although the minor riwaqs were paved with stone. The prayer hall includes two blind windows decorated either in the Andalusian or Moroccan style, one in a geometric pattern and the other in floral.
The mihrab and minbar are both decorated in a typical period style. The minbar is decorated with finely carved wooden doors and panels, and above the minbar is a large rosette of polychrome marble. This is particularly unique because this style is usually used on a floor, rather than upon a wall.
The funerary chambers are largely plain, although there are cenotaphs carved in marble. The largest of these cenotaphs is a quote from the Qur'an in Kufic script reading "Surely those who avoid evil will be among gardens and fountains: enter them in peace, secure" (Qur'an 15:45-46). The visual style of the carved Kufic inscriptions dates it to the Fatimid period, meaning al-Mu'ayyad likely salvaged it from an earlier building. Both funerary chambers have shallow mihrabs on their walls facing the lesser riwaqs. These mihrabs were likely used by people praying within each riwaq, especially in the case of overflow during peak prayer times.
Other rooms in the mosque included a library, which was itself known for its collection of books. The majority of books in the library came directly from the Citadel's royal collection. Five hundred others were donated by the sultan's private secretary, Muhammad al-Barizi. For this contribution, al-Barizi's son was appointed as the mosque's preacher and librarian. Donations similar to this were common among high-level bureaucrats in the hope that they might gain similar favor with the Sultan.
The mosque has a remarkably large pavilion compared to other mosques in the area with an ablutions fountain in the centre. The original fountain was said to have marble columns roofed with a gilded wooden dome above an awning, adding to the building's splendor. Just west of the mosque are the ruins of a hammam which was part of the mosque's foundation.
Inside the minarets are carved cartouches signed and dated by the architect upon the completion of each. This is particularly rare; it is very uncommon for an architect to leave his mark on a building in this era. The eastern minaret reads that the "ma'dhana" (or minaret) was built by Muhammad Ibn al-Qazzaz and was finished in August 1419. The western minaret is slightly different, reading that the Sultan al-Mu'ayyad ordered the construction of two "manars" (minarets) and that they were executed by Muhammad Ibn al-Qazzaz and completed in August 1420. Scholars are unsure as to why two different words for minaret were used in each inscription, and it remains a small mystery of the building. There was also a third minaret at the West portal to the street, but it fell into disrepair and was never rebuilt.

## Renovations

Throughout its history, the Mosque of Sultan al-Mu'ayyad has undergone extensive renovations. Even early on, reconstruction was necessary. According to al-Maqrizi, the eastern minaret had to be pulled down and rebuilt as early as 1418 due to structural insecurity from its tower base. Another three-story minaret stood at the Western portal on a side street; it collapsed in 1427 during Sultan Barsbay's reign and was immediately rebuilt.
By the nineteenth century, the mosque had fallen into such disrepair that all that remained was one facade, the prayer hall, and the mausoleums. Ibrahim Pasha, the son of Muhammad 'Ali, oversaw restorations in the late 1830s and 1840s, including the installation of Turkish tiles in the qibla wall. In the late nineteenth century, the Comité de Conservation des Monuments de l'Art Arabe rebuilt the western facade and turned the courtyard into a garden.
In 2001, the mosque again underwent restorations, this time by the order of the Egyptian Ministry of Culture. These restorations removed the garden from the courtyard and rebuilt the majority of the mosque, including missing arcades around the courtyard. This project has restored the mosque and its results can be seen today; however, visitors should note that what they see is not necessarily what the mosque looked like in its original form.