Aqmar Mosque

Al-jāmiʿ al-aqmar, or al-Aqmar Mosque (Arabic: الجامع الأقمر , literally: Moonlit mosque), was built in Cairo, Egypt, as a neighborhood mosque by the Fatimid vizier al-Ma’mun al-Bata’ihi in 1125-6 CE (519 Hijri). Similarly to the mosque of al-Azhar (970) and the mosque of al-Hakim (990-1013), formerly named al-Anwar, the name of the al-Aqmar mosque is an epithet of the patron in connection with light. The mosque is situated on what was once the main avenue and ceremonial heart of Cairo, in the immediate neighborhood of the Fatimid caliphal palaces, known today as Muʿizz Street.
History.
The mosque was built by the Fatimid vizier al-Ma’mun al-Bata’ihi, who served in this position from 1121 to 1125 under the Caliph al-Amir. He served during a period of great political and spiritual crisis for the Fatimid Caliphate, not long after the sudden incursion of the First Crusade. He initiated a number of reforms and revived the ceremonial aspects of the caliphate, both at court and in public. He also conducted other constructions and renovations inside the Fatimid Great Palaces. He was arrested shortly after completing the mosque in 1125, and was executed 3 years later.He had grown up in poverty following his father's death and, before being hired by the vizier al-Afdal (his predecessor), he had been working low-status jobs which reportedly included learning building skills. This early experience may have encouraged his later architectural achievements.
The al-Aqmar mosque was built at the northeastern corner of the eastern Fatimid Great Palace, and may have served both the neighbourhood and the palace inhabitants. Its adjacency to the palace may have been one reason why it did not feature a minaret; in order to prevent anyone climbing the minaret from looking down into the caliph's palaces.
The Mamluk amir Yalbugha al-Salimi restored the mosque in 1393 or 1397 and added a minaret (which collapsed in 1412 and was later restored) as well as shop stalls to the right of the entrance. Al-Salimi also restored or replaced the "minbar", the "mihrab", and the ablutions area.
In 1993, the mosque was extensively and heavily renovated by the Dawoodi Bohras. This included the replacement of al-Salimi's "mihrab" with a new marble "mihrab" and the reconstruction of the southern half of the exterior facade by replicating the preserved northern half. This renovation has been criticized for sacrificing some historic elements of the mosque, especially in its interior.
Architecture.
The mosque has been called a "seminal" monument in the architectural history of Cairo. It is significant for two features in particular: the decoration of its façade and the design of its floor plan.
Plan and layout.
The mosque of al-Aqmar the first building in Cairo with an adjustment to the street alignment. The plan of the mosque of al-Aqmar is hypostyle with three bays on the qibla side and one bay around the square courtyard. In the courtyard, a band of plain Kufic inscriptions with a floriated background runs around four-centered arches. The novelty of the plan lays in the facade's alignment with the street in contrast with its interior space, which remains oriented towards the qibla. In order to accommodate this difference in angle while still maintaining internal symmetry, the structure uses variations in wall thickness. Here, street alignment starts to play a pivotal role because the Muʿizz Street – previously known as the Qasaba – had become the most important avenue in the old city and the mosque's façade had to be in harmony with the adjacent Fatimid caliphal palaces.
Features of the façade's decoration.
The mosque of al-Aqmar was the earliest to have lavish decoration across the entire façade. Elements decorating the façade are loaded with symbolic meaning and can be interpreted in various ways (see also the gallery below). One notable feature is the large medallion in the hood of the main niche above the entrance. This epigraphic medallion is pierced in the form of a grille, which is unique to the decorative repertoire of architectural façades in Cairo. “Muhammad and ʿAli” take up the center of the medallion surrounded by a Qur’anic inscription. The Qur’anic inscription around the medallion starts on the lower right side, stating:
“In the name of Allah, the Beneficent, the Merciful, O People of the House ["ahl al-bayt"] God only desires to put away from you abomination and with cleansing to cleanse you.” 
Fatimids specifically interpret this Qur’anic inscription as a reference to themselves, using it as a statement of legitimacy and manifestation of Shiʿi ideology. The last few words of the inscriptions are cramped and placed on a new line, which indicates that the ratio of space to words was miscalculated.
The façade is divided into a variation of recesses: some, such as the main niche above the entrance, have a scalloped-shell hood with a medallion in the center while others, such as the niches flanking the main entrance niche, have flat "muqarnas" panels. The left beveled corner, topped by a "muqarnas" niche with the names of Muhammad and ʿAli, was designed to facilitate traffic turning around the corner, another unique feature to Cairo.
The combination of Mohammad and Ali are further prominent in the decoration of the left half of the façade, here name of Ali is in center and encircled by five linked Muhammad. The extravagantly decorated façade is what makes this mosque the major architectural monument of its time. It is important to note that the right side of the portal was later covered by another building and its current state is a modern restoration and reconstruction by the Bohras, hence the stone's lighter color and smoother texture in comparison with the original masonry of the rest of the façade.
Other carved images offer more abstract symbols. To the very left of the façade, there is a window grille framed by an arch resting on two small columns with the Muslim profession of faith above and roundels filling the spandrels in the names of Muhammad and ʿAli. The grille is formed of a radiating six-pointed star with a lamp hanging in the center. One scholarly claim argues that this window represents a "mihrab" (prayer niche), similar to a flat stucco "mihrab" found in the mosque of Ibn Tulun; however, the "mihrab" referred to has a star hanging from a chain and not a lamp. A more plausible argument proposed by another scholar is that the window represents a "shubbāk", the grille from which the caliph appeared to the public on Fatimid ceremonial occasions, specifically symbolizing a famous grille taken by the Fatimids from the palace of their Abbasid rivals in Baghdad and placed as an emblem of victory in the neighboring palace.
Near the grilled window, on the same side of the façade, are carved panels representing doors. One possible interpretation of the doors is in reference to the famous Shiʿi "hadith": “I am the city of knowledge and ʿAli is its gate”. The carved panels could also have a political interpretation rather than a religious one, representing the doors of the caliph's court ("Bab al-Majlis") in connection with the official role of the mosque's founder, al-Ma’mun al-Bata’ihi, as master of the door ("Sahib al-Bab"); thereby symbolizing the Fatimid vizier's function in governing who had access to the caliph. Although the grilled window and the carved door panels represent real objects, their particular use as part of the façade's decorative scheme grants them a metaphorical meaning associated with the historical framework of Fatimid caliphal rituals.
Lastly, the main foundation inscription of the mosque runs along the top of the façade, directly below the cornice of the building. Much of the inscription is missing, but what still survives mentions the reigning caliph al-Amir, his father al-Mustaʿli, and the vizier al-Bata’ihi. It translates as follows:
(Basmala, has ordered its construction ... the servant of our lord and master the imam al-Amir bi-ahkam Allah the son of the imam al-Musta'li) Bi'llah, commander of the faithful, may God's prayers be upon them and upon their pure and honourable ascendants, and their pious descendants, seeking the favour of God, the King, the Generous...O God, give victory to the armies of the imam al-Amir bi-ahkam Allah, commander of the faithful, over all the infid(els...the most noble lord, al-Ma'mun amir of the armies, sword of Islam, defender of the imam), protector of the judges of the Muslims and the director of the missionaries of the believers, Abu 'Abd Allah Muhammad (servant of) al-Amir, may God strengthen religion for him, may He make the commander of the faithful enjoy long life, may He perpetuate his power and elevate his word, in the year 519 [1125-6]."
The name of the reigning caliph's father, al-Mustaʿli, is placed in the center of the inscription frieze above the entrance door for maximum exposure. While the inscriptions of the upper band are carved in relief with floriated letters, the lower band of inscriptions are plain, relatively small in size with flat letters and a floriated stem in the background.
Minaret.
The minaret was added later by the Mamluk amir Yalbugha al-Salimi as part of his restorations in 1393 or 1397. Only the lower part of al-Salimi's minaret survives, which is built of brick covered in stucco, topped with stone muqarnas, convex molding below, and a band of carved arabesques interrupted by openwork bosses in the middle. The upper part of the minaret by al-Salimi fell in 1412 and was replaced by a cylindrical finial most likely during the Ottoman period.