Al-Azhar Mosque (Arabic: الجامع الأزهر al-Gāmi` al-Azhar, "mosque of the most resplendent") is a mosque in Islamic Cairo in Egypt. Al-Mu'izz li-Din Allah of the Fatimid Caliphate commissioned its construction for the newly established capital city in 970. Its name is usually thought to allude to the Islamic prophet Muhammad's daughter Fatimah, a revered figure in Islam who was given the title az-Zahrā′ ("the shining or resplendent one"). It was the first mosque established in Cairo, a city that has since gained the nickname "the City of a Thousand Minarets."
After its dedication in 972, and with the hiring by mosque authorities of 35 scholars in 989, the mosque slowly developed into what is today the second oldest continuously run university in the world after Al Karaouine in Umayyad Fes. Al-Azhar University has long been regarded as the foremost institution in the Islamic world for the study of Sunni theology and sharia, or Islamic law. The university, integrated within the mosque as part of a mosque school since its inception, was nationalized and officially designated an independent university in 1961, following the Egyptian Revolution of 1952.
Over the course of its over a millennium-long history, the mosque has been alternately neglected and highly regarded. Because it was founded as a Shiite Ismaili institution, Saladin and the Sunni Ayyubid dynasty that he founded shunned al-Azhar, removing its status as a congregational mosque and denying stipends to students and teachers at its school. These moves were reversed under the Mamluk Sultanate, under whose rule numerous expansions and renovations took place. Later rulers of Egypt showed differing degrees of deference to the mosque and provided widely varying levels of financial assistance, both to the school and to the upkeep of the mosque. Today, al-Azhar remains a deeply influential institution in Egyptian society that is highly revered in the Sunni Muslim world and a symbol of Islamic Egypt.
The architecture of al-Azhar is closely tied to the history of Cairo. Materials taken from multiple periods of Egyptian history, from the Ancient Egyptians, through Greek and Roman rule, to the Coptic Christian era, were used in the early mosque structure, which drew on other Fatimid structures in Ifriqiya.Later additions from the different rulers of Egypt likewise show influences from both within and outside of Egypt. Sections of the mosque show many of these influences blended together while others show a single inspiration, such as domes from the Ottoman period and minarets built by the Mamluks.
Initially built as a prayer hall with five aisles and a modest central courtyard, the mosque has since been expanded multipe times with additional installations completely surrounding the original structure. Many of Egypt's rulers have shaped the art and architecture of al-Azhar, from the minarets added by the Mamluks and the gates added during Ottoman rule to more recent renovations such as the installation of a new mihrab. None of the original minarets or domes have survived, with some of the current minarets having been rebuilt several times.