Al-Qarawiyyin University
Education at the University of al-Qarawiyyin concentrates on the Islamic religious and legal sciences with a heavy emphasis on, and particular strengths in, Classical Arabic grammar/linguistics and Maliki Sharia, though lessons on non-Islamic subjects are also offered to students. Teaching is still delivered in the traditional methods. The university is attended by students from all over Morocco and Muslim West Africa, with some also coming from further abroad. Women were first admitted to the institution in the 1940s.
Name
The Arabic name of the university means "University of the People from Kairouan". Factors such as the provenance of Fatima al-Fihriya's family in Tunisia, the presence of the letter Qāf (ق) – a voiceless uvular plosive which has no equivalent in European languages – the ويّي ([awijiː]) triphthong in the university's name, and the French colonization of Morocco have resulted in a number of different orthographies for the romanization of the university's name, including al-Qarawiyyin, a standard anglicization; Al Quaraouiyine, following French orthography; and Al-Karaouine, another rendering using French orthography.
History
Foundation of the mosque
In the 9th century, Fez was the capital of the Idrisid dynasty, considered to be the first Moroccan Islamic state. According to one of the major early sources on this period, the Rawd al-Qirtas by Ibn Abi Zar, al-Qarawiyyin was founded as a mosque in 857 or 859 by Fatima al-Fihri, the daughter of a wealthy merchant named Mohammed al-Fihri. The al-Fihri family had migrated from Kairouan (hence the name of the mosque), Tunisia to Fez in the early 9th century, joining a community of other migrants from Kairouan who had settled in a western district of the city. Fatima and her sister Mariam, both of whom were well educated, inherited a large amount of money from their father. Fatima vowed to spend her entire inheritance to build a mosque suitable for her community. Similarly, her sister Mariam is also reputed to have founded al-Andalusiyyin Mosque the same year.
This foundation narrative has been questioned by some modern historians who see the symmetry of two sisters founding the two most famous mosques of Fez as too convenient and likely originating from a legend. Ibn Abi Zar is also judged by contemporary historians to be a relatively unreliable source. One of the biggest challenges to this story is a foundation inscription that was rediscovered during renovations to the mosque in the 20th century, previously hidden under layers of plaster for centuries. This inscription, carved onto cedar wood panels and written in a Kufic script very similar to foundation inscriptions in 9th-century Tunisia, was found on a wall above the probable site of the mosque's original mihrab (prior to the building's later expansions). The inscription, recorded and deciphered by Gaston Deverdun, proclaims the foundation of "this mosque" (Arabic: "هذا المسجد") by Dawud ibn Idris (a son of Idris II who governed this region of Morocco at the time) in Dhu al-Qadah 263 AH (July–August of 877 CE). Deverdun suggested the inscription may have come from another unidentified mosque and was moved here at a later period (probably 15th or 16th century) when the veneration of the Idrisids was resurgent in Fez, and such relics would have held enough religious significance to be reused in this way. However, Chafik Benchekroun argued more recently that a more likely explanation is that this inscription is the original foundation inscription of al-Qarawiyyin itself and that it might have been covered up in the 12th century just before the Almohads' arrival in the city. Based on this evidence and on the many doubts about Ibn Abi Zar's narrative, he argues that Fatima al-Fihri is quite possibly a legendary figure rather than a historical one. Péter T. Nagy has also stated that the uncovered foundation inscription is more convincing evidence of the mosque's original foundation date than the traditional historiographical narrative.
Early history
Some scholars suggest that some teaching and instruction probably took place at al-Qarawiyyin Mosque from a very early period or from its beginning. Major mosques in the early Islamic period were typically multi-functional buildings where teaching and education took place alongside other religious and civic activities. The al-Andalusiyyin Mosque, in the district across the river, may have also served a similar role up until at least the Marinid period, though it never equaled the Qarawiyyin's later prestige. It is unclear at what time al-Qarawiyyin began to act more formally as an educational institution, partly because of the limited historical sources that pertain to its early period. The most relevant major historical texts like the Rawd al-Qirtas by Ibn Abi Zar and the Zahrat al-As by Abu al-Hasan Ali al-Jazna'i do not provide any clear details on the history of teaching at the mosque, though al-Jazna'i (who lived in the 14th century) mentions that teaching had taken place there before his time. Otherwise, the earliest mentions of halaqa (circles) for learning and teaching may not have been until the 10th or the 12th century. Historian Abdelhadi Tazi indicates the earliest clear evidence of teaching at al-Qarawiyyin in 1121. Moroccan historian Mohammed Al-Manouni believes that the mosque acquired its function as a teaching institution during the reign of the Almoravids (1040–1147). Historian Évariste Lévi-Provençal dates the beginning of teaching to the Marinid period (1244–1465).
In the 10th century, the Idrisid dynasty fell from power and Fez was contested between the Fatimid and Córdoban Umayyad caliphates and their allies. During this period, the Qarawiyyin Mosque progressively grew in prestige. At some point the khutba (Friday sermon) was transferred from the Shurafa Mosque of Idris II (today the Zawiya of Moulay Idris II) to the Qarawiyyin Mosque, granting it the status of Friday mosque (the community's main mosque). This transfer happened either in 919 or in 933, both dates that correspond to brief periods of Fatimid domination over the city, and suggests that the transfer may have occurred by Fatimid initiative. The mosque and its learning institution continued to enjoy the respect of political elites, with the mosque itself being significantly expanded by the Almoravids and repeatedly embellished under subsequent dynasties. Tradition was established that all the other mosques in Fez based the timing of their call to prayer (adhan) according to that of al-Qarawiyyin.
Apogee during the Marinid period
Many scholars consider al-Qarawiyyin's high point as an intellectual and scholarly center to be in the 13th and 14th centuries, when the curriculum was at its broadest and its prestige had reached new heights after centuries of expansion and elite patronage. Among the subjects taught around this period or shortly after were traditional religious subjects such as the Quran and fiqh (Islamic jurisprudence), and other sciences like grammar, rhetoric, logic, medicine, mathematics, astronomy and geography. By contrast, some subjects like alchemy/chemistry were never officially taught as they were considered too unorthodox.
Starting in the late 13th century, and especially in the 14th century, the Marinid dynasty was responsible for constructing a number of formal madrasas in the areas around al-Qarawiyyin's main building. The first of these was the Saffarin Madrasa in 1271, followed by al-Attarine in 1323, and the Mesbahiya Madrasa in 1346. A larger but much later madrasa, the Cherratine Madrasa, was also built nearby in 1670. These madrasas taught their own courses and sometimes became well-known institutions, but they usually had narrower curricula or specializations. One of their most important functions seems to have been to provide housing for students from other towns and cities – many of them poor – who needed a place to stay while studying at al-Qarawiyyin. Thus, these buildings acted as complimentary or auxiliary institutions to al-Qarawiyyin itself, which remained the center of intellectual life in the city.
Al-Qarawiyyin also compiled a large selection of manuscripts that were kept at a library founded by the Marinid sultan Abu Inan Faris in 1349. The collection housed numerous works from the Maghreb, al-Andalus, and the Middle East. Part of the collection was gathered decades earlier by Sultan Abu Yusuf Ya'qub (ruled 1258–1286), who persuaded Sancho IV of Castile to hand over a number of works from the libraries of Seville, Córdoba, Almeria, Granada, and Malaga in al-Andalus/Spain. Abu Yusuf initially housed these in the nearby Saffarin Madrasa (which he had recently built), but later moved them to al-Qarawiyyin. Among the most precious manuscripts currently housed in the library are volumes from the Al-Muwatta of Malik written on gazelle parchment, a copy of the Sirat by Ibn Ishaq, a 9th-century Quran manuscript (also written on gazelle parchment), a copy of the Quran given by Sultan Ahmad al-Mansur in 1602, a copy of Ibn Rushd's Al-Bayan Wa-al-Tahsil wa-al-Tawjih (a commentary on Maliki fiqh) dating from 1320, and the original copy of Ibn Khaldun's book Al-'Ibar (including the Muqaddimah) gifted by the author in 1396. Recently rediscovered in the library is an ijazah certificate, written on deer parchment, which some scholars claim to be the oldest surviving predecessor of a Medical Doctorate degree, issued to a man called Abdellah Ben Saleh Al Koutami in 1207 CE under the authority of three other doctors and in the presence of the chief qadi (judge) of the city and two other witnesses. The library was managed by a qayim or conservator, who oversaw the maintenance of the collection. By 1613 one conservator estimated the library's collection at 32,000 volumes.
Students were male, but traditionally it has been said that "facilities were at times provided for interested women to listen to the discourse while accommodated in a special gallery (riwaq) overlooking the scholars' circle". The 12th-century cartographer Mohammed al-Idrisi, whose maps aided European exploration during the Renaissance, is said to have lived in Fez for some time, suggesting that he may have worked or studied at al-Qarawiyyin. The institution has produced numerous scholars who have strongly influenced the intellectual and academic history of the Muslim world. Among them are Ibn Rushayd al-Sabti (d. 1321), Mohammed Ibn al-Hajj al-Abdari al-Fasi (d. 1336), Abu Imran al-Fasi (d. 1015) – a leading theorist of the Maliki school of Islamic jurisprudence, and Leo Africanus. Pioneer scholars such as Muhammad al-Idrissi (d.1166 AD), Ibn al-Arabi (1165–1240 AD), Ibn Khaldun (1332–1395 AD), Ibn al-Khatib (d. 1374), Nur ad-Din al-Bitruji (Alpetragius) (d. 1294), and Ali ibn Hirzihim (d. 1163) were all connected with al-Qarawiyyin as either students or lecturers. Some Christian scholars visited al-Qarawiyyin, including Nicolas Cleynaerts (d. 1542) and the Jacobus Golius (d. 1667). The 19th-century orientalist Jousé Ponteleimon Krestovitich also claimed that Gerbert d'Aurillac (later Pope Sylvester II) studied at al-Qarawiyyin in the 10th century. Although this claim about Gerbert is sometimes repeated by modern authors, modern scholarship has not produced evidence to support this story.
Decline and reforms
Al-Qarawiyyin underwent a general decline in later centuries along with Fez. The strength of its teaching stagnated and its curriculum decreased in range and scope, becoming focused on traditional Islamic sciences and Arabic linguistic studies. Even some traditional Islamic specializations like tafsir (Quranic exegesis) were progressively neglected or abandoned. In 1788–89, the 'Alawi sultan Muhammad ibn Abdallah introduced reforms that regulated the institution's program, but also imposed stricter limits and excluded logic, philosophy, and the more radical Sufi texts from the curriculum. Other subjects also disappeared over time, such as astronomy and medicine. In 1845 Sultan Abd al-Rahman carried out further reforms, but it is unclear if this had any significant long-term effects. Between 1830 and 1906 the number of faculty decreased from 425 to 266 (of which, among the latter, only 101 were still teaching).
By the 19th century, the mosque's library also suffered from decline and neglect. A significant portion of its collection was lost over time, most likely due to lax supervision and to books that were not returned. By the beginning of the 20th century, the collection had been reduced to around 1,600 manuscripts and 400 printed books, though many valuable historic items were retained.
By the late 19th century, Western scholars began to recognize al-Qarawiyyin as a "university", a description which would become more established during the French protectorate period in the 20th century.
20th century and transformation into state university
At the time Morocco became a French protectorate in 1912, al-Qarawiyyin worsened as a religious center of learning from its medieval prime, though it retained some significance as an educational venue for the sultan's administration. The student body was rigidly divided along social strata: ethnicity (Arab or Berber), social status, personal wealth, and geographic background (rural or urban) determined the group membership of the students who were segregated by the teaching facility, as well as in their personal quarters.
The French administration implemented a number of structural reforms between 1914 and 1947, including the institution of calendars, appointment of teachers, salaries, schedules, general administration, and the replacement of the ijazah with the shahada alamiyha, but did not modernize the contents of teaching likewise which were still dominated by the traditional worldviews of the ulama. At the same time, the student numbers at al-Qarawiyyin decreased to 300 in 1922 as the Moroccan elite sent their children to the newly founded Western-style colleges and institutes elsewhere in the country. Moroccan and French authorities began planning further reforms for al-Qarawiyyin in 1929. In 1931 and 1933, on the orders of Muhammad V, the institution's teaching was reorganized into elementary, secondary, and higher education.
Al-Qarawiyyin also played a role in the Moroccan nationalist movement and in protests against the French colonial regime. Many Moroccan nationalists had received their education here and some of their informal political networks were established due to the shared educational background. In July 1930, al-Qarawiyyin strongly participated in the propagation of Ya Latif, a communal prayer recited in times of calamity, to raise awareness and opposition to the Berber Dahir decreed by the French authorities two months earlier. In 1937 the mosque was one of the rallying points (along with the nearby R'cif mosque) for demonstrations in response to a violent crackdown on Moroccan protesters in Meknes, which ended with French troops being deployed across Fes el-Bali and at the mosques.
In 1947, al-Qarawiyyin was integrated into the state educational system, and women were first admitted to study there during the 1940s. In 1963, after Moroccan independence, al-Qarawiyyin was officially transformed by royal decree into a university under the supervision of the ministry of education. Classes at the old mosque ceased and a new campus was established at a former French Army barracks. While the dean took his seat at Fez, four faculties were founded in and outside the city: a faculty of Islamic law in Fez, a faculty of Arab studies in Marrakech, and two faculties of theology in Tétouan and near Agadir. Modern curricula and textbooks were introduced and the professional training of the teachers improved. Following the reforms, al-Qarawiyyin was officially renamed "University of Al Quaraouiyine" in 1965.
In 1975, General Studies was transferred to the newly founded Sidi Mohamed Ben Abdellah University; al-Qarawiyyin kept the Islamic and theological courses of studies. In 1973, Abdelhadi Tazi published a three-volume history of the establishment entitled جامع القرويين (The al-Qarawiyyin Mosque).
In 1988, after a hiatus of almost three decades, the teaching of traditional Islamic education at al-Qarawiyyin was resumed by King Hassan II in what has been interpreted as a move to bolster conservative support for the monarchy.
Education and curriculum
Education at al-Qarawiyyin University concentrates on the Islamic religious and legal sciences with a heavy emphasis on, and particular strengths in, Classical Arabic grammar/linguistics and Maliki law, though some lessons on other non-Islamic subjects such as French and English are also offered to students. Teaching is delivered with students seated in a semi-circle around a sheikh, who prompts them to read sections of a particular text; asks them questions on particular points of grammar, law, or interpretation; and explains difficult points. Students from Morocco and Islamic West Africa attend al-Qarawiyyin, though some come from Muslim Central Asia. Spanish Muslim converts frequently attend the institution, largely attracted by the fact that the sheikhs of al-Qarawiyyin, and Islamic scholarship in Morocco in general, are heirs to the rich, religious, and scholarly heritage of Muslim al-Andalus.
Most students at al-Qarawiyyin range are between 13 and 30 years old, and study towards high school-level diplomas and university-level bachelor's degrees, although Muslims with a sufficiently high level of Arabic can attend lecture circles on an informal basis, given the traditional category of visitors "in search of [religious and legal] knowledge". In addition to being Muslim, prospective students of al-Qarawiyyin are required to have fully memorized the Quran, as well as other shorter medieval Islamic texts on grammar and Maliki law, and to be proficient in classical Arabic.
Architecture of the mosque
Al-Qarawiyyin Mosque was founded in the 9th century, but its present form is the result of a long historical evolution over the course of more than 1,000 years. Successive dynasties expanded the mosque until it became the largest in Africa, with a capacity of 22,000 worshipers. The present-day mosque covers an extensive area of about half a hectare. Broadly speaking, it consists of a large hypostyle interior space for prayers (the prayer hall), a courtyard with fountains (the sahn), a minaret at the courtyard's western end, and a number of annexes around the mosque itself.
Historical evolution
Early history (9th–10th centuries)
The original mosque building was built in the 9th century. A major modern study of the mosque's structure, published by French archeologist and historian Henri Terrasse in 1968, determined that traces of the original mosque could be found in the layout of the current building. This initial form of the mosque occupied a large space immediately to the south of the sahn, in what is now the prayer hall. It had a rectangular floor plan measuring 36 by 32 meters, covering an area of 1520 square meters, and was composed of a prayer hall with four transverse aisles running roughly east–west, parallel to the southern qibla wall. It probably also had a courtyard of relatively small size, and the first minaret, also of small size, reportedly stood on the location now occupied by the wooden anaza (at the central entrance to the prayer hall from the courtyard). Water for the mosque was initially provided by a well dug within the mosque's precinct.
As Fez grew and the mosque increased in prestige, the original building was insufficient for its religious and institutional needs. During the 10th century, the Umayyad Caliphate of Córdoba and the Fatimid Caliphate constantly fought for control over Fez and Morocco, seen as a buffer zone between the two. Despite this uncertain period, the mosque received significant patronage and had its first expansions. The Zenata Berber emir Ahmed ibn Abi Said, one of the rulers of Fez during this period who was aligned with the Umayyads, wrote to the caliph Abd al-Rahman III in Córdoba for permission and funds to expand the mosque. The caliph approved, and the work was carried out or completed in 956. It expanded the mosque on three sides, encompassing the area of the present-day courtyard to the north and up to the current eastern and western boundaries of the building. It also replaced the original minaret with a new, larger minaret still standing today. Its overall form, with a square shaft, was indicative of the subsequent development of Maghrebi and Andalusian minarets.
The mosque was embellished when the Amirid ruler al-Muzaffar (son of al-Mansur) led a military expedition to Fez in 998. The embellishments included a new minbar and a dome topped by talismans in the shape of a rat, a serpent, and a scorpion. Of these, only the dome itself, whose exterior is distinctively fluted or grooved, survives today, located above the courtyard entrance to the prayer hall. A similar dome, located across the courtyard over the northern entrance of the mosque (Bab al-Ward or "Gate of the Rose"), likely also dates from the same time.
Almoravid expansion (12th century)
One of the most significant expansions and renovations was carried out between 1134 and 1143 under the patronage of the Almoravid ruler Ali ibn Yusuf. The prayer hall was extended by dismantling the existing southern wall and adding three more transverse aisles for a total of ten, while replicating the format of the existing arches of the mosque. This expansion required the purchase and demolition of a number of neighboring houses and structures, including some that were apparently part of the nearby Jewish neighbourhood (before the Mellah of Fez).
The new expansion of the mosque involved not only a new mihrab in the middle of the new southern wall, but also the reconstruction or embellishment of the prayer hall's central nave (the arches along its central axis, in a line perpendicular to the southern wall and to the other rows of arches) leading from the courtyard to the mihrab. This involved not only embellishing some of the arches with new forms but also adding a series of highly elaborate cupola ceilings composed in muqarnas (honeycomb or stalactite-like) sculpting and further decorated with intricate reliefs of arabesques and Kufic letters. The craftsmen who worked on this expansion are mostly anonymous, except for two names that are carved on the bases of two of the cupolas: Ibrāhīm and Salāma ibn Mufarrij, who may have been of Andalusi origin. Lastly, a new minbar in similar style and of similar artistic provenance as the minbar of the Koutoubia Mosque was completed and installed in 1144. It is made of wood in an elaborate work of marquetry, and decorated with inlaid materials and intricately carved arabesque reliefs. Its style was emulated for later Moroccan minbars.
Elsewhere, many of the mosque's main entrances were given doors made of wood overlaid with ornate bronze fittings, which today count among the oldest surviving bronze artworks in Moroccan architecture. Another interesting element added to the mosque was a small secondary oratory, known as the Jama' al-Gnaiz ("Funeral Mosque" or "Mosque of the Dead"), which was separated from the main prayer hall and dedicated to providing funerary rites for the deceased before their burial. The annex is also decorated with a muqarnas cupola and ornate archways and windows.
Almohad period (12th–13th centuries)
Later dynasties continued to embellish the mosque or gift it with new furnishings, though no works as radical as the Almoravid expansion were undertaken again. The Almohads (later 12th century and 13th century) conquered Fez after a long siege in 1145–1146. Historical sources (particularly the Rawd al-Qirtas) report a story claiming that the inhabitants of Fez, fearful that the "puritan" Almohads would resent the lavish decoration placed inside the mosque, used whitewash to cover up the most ornate decorations from Ibn Yusuf's expansion near the mihrab. Terrasse suggests this operation may have actually been carried out a few years later by the Almohad authorities themselves. The Almoravid ornamentation was only fully uncovered again during renovations in the early 20th century. The plaster used to cover the Almoravid decoration seems to have been prepared too quickly and did not fully bond with the existing surface. This ended up making its removal easier during modern restorations and has helped to preserve much of the original Almoravid decoration now visible again today.
Under the reign of Muhammad al-Nasir (r. 1199–1213), the Almohads added and upgraded a number of elements in the mosque, some of which were nonetheless marked with strong decorative flourishes. The ablutions facilities in the courtyard were upgraded, a separate ablutions room was added to the north, and a new underground storage room was created. They also replaced the mosque's grand chandelier with one made of bronze, which Terrasse described as "the largest and most beautiful chandelier in the Islamic world," and which hangs in the central nave of the mosque today. It was commissioned by Abu Muhammad 'Abd Allah ibn Musa, the khatib of the mosque during the years 1202 to 1219. The chandelier has the shape of a 12-sided cupola surmounted by a large cone, around which are nine levels that hold candlesticks. It could originally hold 520 oil candles; the cost of providing the oil was so significant that it was only lit on special occasions, such as on the nights of Ramadan. The Marinid sultan Abu Ya'qub Yusuf (r. 1286–1307), upon seeing the cost, ordered that it only be lit for the last day of Ramadan. The visible surfaces of the chandelier are carved and pierced with intricate floral arabesque motifs as well as Kufic Arabic inscriptions. The chandelier is the oldest surviving chandelier in the western Islamic world, and it likely served as a model for the Marinid chandelier in the Great Mosque of Taza.
Marinid period (13th–14th centuries)
The Marinids, who were responsible for building many of the madrasas around Fez, made various contributions to the mosque. In 1286 they restored and protected the 10th-century minaret, which had been made from deteriorating poor-quality stone with whitewash. At its southern foot, they also built the Dar al-Muwaqqit, a chamber for the timekeeper (muwaqqit) of the mosque who was responsible for determining the precise times of prayer. The chamber was equipped with astrolabes and other scientific equipment of the era in order to aid in this task. Several water clocks were built for it in this period. The first two do not exist anymore, but are described by al-Jazna'i in the Zahrat al-As. The first was commissioned by Abu Yusuf Ya'qub in the 13th century and designed by Muhammad ibn al-Habbak, a faqih and muwaqqit. The second was built in 1317 or 1318 (717 AH), under the reign of Abu Sa'id, by a scholar named Abu Abdullah Muhammad al-Sanhaji. Its time divisions were engraved by Abu Abdullah Muhammad ibn al-Saddina al-Qarsatuni. The clock was neglected then restored between 1346 and 1349 (747–749 AH) by a new muwaqqit, Abu Abdullah Muhammad ibn al-'Arabi. A third and final water clock, built on the orders of Sultan Abu Salim Ali II (ruled 1359–1361), is still partly preserved today. It was designed by Abu Zayd Abd al-Rahman ibn Sulayman al-Laja'i and completed on November 20, 1361 (21 Muharram 763 AH), as recorded by an original inscription. It features a large astrolabe with a diameter of 71 cm, which is embedded into a wooden structure in the corner of the room, but its mechanism is no longer present.
-
View of the Dar al-Muwaqqit, with its double-arched window overlooking the courtyard
-
The astrolabe of the water clock device completed in 1361 by al-Laja'i
The galleries around the sahn were also rebuilt or repaired in 1283 and 1296–97, while at the entrance from the courtyard to the prayer hall (leading to the central nave of the mihrab), a decorative wooden screen, called the anaza, was installed in 1289 and acted as a symbolic "outdoor" or "summer" mihrab for prayers in the courtyard. The stucco decoration on the entrance arch itself, however, dates from much later. At the central outer entrance to the courtyard from the north, the cupola ceiling over the entrance vestibule of the gate called Bab al-Ward ("Gate of the Rose") was redecorated with carved stucco in 1337. The richly-sculpted archway on the inner side of the gate also dates from this time.
-
Marinid decoration in the cupola over the vestibule of Bab al-Ward, the central northern gate of the mosque
-
Inner façade of Bab al-Ward, with Marinid-era stucco embellishment
-
The wooden anaza at the courtyard entrance to the prayer hall
A number of ornate metal chandeliers hanging in the mosque's prayer hall date from the Marinid era. Three of them were made from church bells which Marinid craftsmen used as a base onto which they grafted ornate copper fittings. The largest of them, installed in the mosque in 1337, was a bell brought back from Gibraltar by the son of Sultan Abu al-Hasan, Abu Malik, after its reconquest from Spanish forces in 1333.
The mosque's library was officially founded by Sultan Abu Inan in 1349 (750 AH), as dated by an inscription over its doorway. This first Marinid library was located at the mosque's northeastern corner (as opposed to the library's current southern location). In 1361, Sultan Abu Salim added a room to it, which was built above and over the adjacent street, and dedicated to readings of the Quran.
Saadian and 'Alawi period (16th-century to modern era)
The Saadians embellished the mosque by adding two prominent pavilions to the western and eastern ends of the courtyard, each of which sheltered a new fountain. The Saadian sultan Ahmad al-Mansur was responsible for building the first pavilion to the east in 1587–88, while the western pavilion was added by his grandson Abdallah al-Ghalib II in 1609. The pavilions emulate the ones in the Court of Lions of the Alhambra palaces (in Granada, Spain). Al-Mansur also built a new room for the library on the south side of the mosque (around the library's current location), which was connected to the mosque via a door in the qibla wall.
The 'Alawi dynasty, which has ruled Morocco from the 17th century onward, continued to perform minor additions and regular maintenance on the mosque. A ribbed cupola in the central nave, where the 1337 Marinid chandelier hangs, has been dated by Terrasse to the 'Alawi period, although Xavier Salmon has more recently argued that at least some elements of the dome seem to date from the Marinid era. The stucco decoration of the central archway at the courtyard entrance to the prayer hall (i.e. the arch inside which the Marinid-era anaza stands) also dates from the 'Alawi period; an inscription at the top of the arch gives the year 1864–1865 (1281 AH).
The present library building dates mainly from a major expansion and modification in the 20th century, particularly in the 1940s. The new library expansion, which included a large new reading room, was inaugurated in 1949.