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.
[c] After the conquest of Egypt, Jawhar al-Siqilli oversaw the construction of the royal enclosure for the caliph's court and the Fatimid army, and had al-Azhar built as a base to spread Isma'ili Shi'a Islam.
[9] Located near the densely populated Sunni city of Fustat, Cairo became the center of the Isma'ili sect of Shi'a Islam, and seat of the Fatimid empire.
[14] Yaqub ibn Killis, a polymath, jurist and the first official vizier of the Fatimids, made al-Azhar a key center for instruction in Islamic law in 988.
[17] Caliph al-Hafiz undertook a major refurbishment in 1138, which established the keel-shaped arches and carved stucco decoration seen in the courtyard today, as well as the dome at the central entrance of the prayer hall.
[20] The reason for this edict may have been Shāfi‘ī teachings that proscribe congregational prayers in a community to only one mosque, or mistrust of the former Shi'a institution by the new Sunni ruler.
[20] Student funding was withdrawn,[20] organized classes were no longer held at the mosque, and the professors that had prospered under the Fatimids were forced to find other means to earn their living.
These colleges, ranging in size, focused on teaching Sunni doctrine, had an established and uniform curriculum that included courses outside of purely religious topics, such as rhetorics, math, and science.
[24] Al-Azhar eventually adopted Saladin's educational reforms modeled on the college system he instituted, and its fortunes improved under the Mamluks, who restored student stipends and salaries for the shuyūkh (teaching staff).
Under Baibars and the Mamluk Sultanate, al-Azhar saw the return of stipends for students and teachers, as well as the onset of work to repair the mosque, which had been neglected for nearly 100 years.
[29] Although the mosque-school was the leading university in the Islamic world and had regained royal patronage, it did not overtake the madrasas as the favored place of education among Cairo's elite.
Al-Azhar maintained its reputation as an independent place of learning, whereas the madrasas that had first been constructed during Saladin's rule were fully integrated into the state educational system.
[19] By the 14th century, al-Azhar had achieved a preeminent place as the center for studies in law, theology, and Arabic, becoming a cynosure for students all around the Islamic world.
[30] One account, by Muhammad ibn Iyas, reports that the Salihiyya Madrasa, and not al-Azhar, was viewed as the "citadel of the ulema" at the end of the Mamluk Sultanate.
[31] With the Ottoman annexation of 1517, despite the mayhem their fight to control the city engendered, the Turks showed great deference to the mosque and its college, though direct royal patronage ceased.
Katkhuda was buried in a mausoleum he himself had built in Al-Azhar; in 1776, he became the first person (and the last) to be interred within the mosque since Nafissa al-Bakriyya, a female mystic who had died around 1588.
[42] In a bid to placate both the Egyptian population and the Ottoman Empire, Napoleon gave a speech in Alexandria in which he proclaimed his respect for Islam and the Sultan: People of Egypt, you will be told that I have come to destroy your religion: do not believe it!
[43]On July 25 Napoleon set up a diwan made up of nine al-Azhar sheikhs tasked with governing Cairo, the first body of Egyptians to hold official powers since the beginning of the Ottoman occupation.
Following the assassination, Napoleon ordered the closing of the mosque; the doors remained bolted until Ottoman and British assistance arrived in August 1801.
[54] Upon the withdrawal of the French, Muhammad Ali Pasha encouraged the establishment of secular learning, and history, math, and modern science were adopted into the curriculum.
[54] Following the French withdrawal, Ali, the wāli (governor) and self-declared khedive (viceroy) of Egypt, sought to consolidate his newfound control of the country.
[44] Under the rule of Isma'il Pasha, the grandson of Muhammad Ali, major public works projects were initiated with the aim of transforming Cairo into a European styled city.
[59] Muhammad Mahdi al-'Abbasi, sheikh al-Azhar, had instituted a set of reforms in 1872 intended to provide structure to the hiring practices of the university as well as to standardize the examinations taken by students.
[66] The law also created secular departments within al-Azhar, such as colleges of medicine, engineering, and economics, furthering the efforts at modernization first seen following the French occupation.
In 1952, the waqfs were nationalized and placed under the authority of the newly created Ministry of Religious Endowments, cutting off the ability of the mosque to control its financial affairs.
[84] Shukri Mustafa, an influential Islamist figure, accused the ulema of providing religious judgments for the sole purpose of government convenience.
The sheikh of al-Azhar provided the ruling, saying that while wearing the hijab is an "Islamic duty" the Muslim women of France are obligated to respect and follow French laws.
[96] In 2020, representatives from the mosque spoke out against sexual violence in Egypt, prompted by the social media campaign instigated by student Nadeen Ashraf.
Contemporary accounts suggest that the Fatimid minaret had defects in its construction and needed to be rebuilt several times,[124] including once under the direction of Sadr al-Din al-Adhra'i al-Dimashqi al-Hanafi, the qadi al-qudat (Chief Justice of the Highest Court) during the rule of Sultan Baibars.
[120] Several additions and restorations were made during Ottoman reign in Egypt, many of which were completed under the direction of Abd al-Rahman Katkhuda who nearly doubled the size of the mosque.