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). '' vault in the central nave of the mosque, made from plaster 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. File:Dar al-Muwaqqit.jpg|View of the
Dar al-Muwaqqit, with its double-arched window overlooking the courtyard File:Astrolabe-ghrifa.jpg|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. File:Qarawiyyin Mosque Bab al-Ward vestibule dome DSCF2971 cropped.jpg|Marinid decoration in the cupola over the vestibule of
Bab al-Ward, the central northern gate of the mosque File:Fes, fez, فاس (9284407750).jpg|Inner façade of
Bab al-Ward, with Marinid-era stucco embellishment File:Al-Karaouine University (Al-Qarawiyyin) in the city of Fes, Morocco (Image 8 of 9).jpg|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. Next to the mosque is a tower known as the
Borj Neffara (, "Tower of the Trumpeters"), an observation tower that is sometimes confused as a minaret but was actually part of another
Dar al-Muwaqqit.
Prayer hall '', with some of the Almohad and Marinid chandeliers visible The interior hypostyle prayer hall takes up most of the mosque's area. Like the interior of most traditional mosques in Moroccan architecture, it is a relatively austere space with mostly plain walls, wooden ceilings, and rows of horseshoe arches. The main area, south of the courtyard, is a vast space divided into ten transverse aisles by rows of arches running parallel to the southern wall. The southern wall of this hall also marks the
qibla. The central axis of the prayer hall, perpendicular to the
qibla wall, is marked by a central nave running between two extra lines of arches along this axis, perpendicular to the other arches. This nave leads towards the
mihrab: a niche in the
qibla wall which symbolizes the direction of prayer, and in front of which the imam usually leads prayers and delivers sermons. This overall layout (a hypostyle hall with a central nave emphasized against the others) is a familiar layout for North African mosques generally, although the Qarawiyyin Mosque differs from most by having its regular aisles of arches run parallel to the
qibla wall rather than perpendicular to it. ), decorated with carved stucco. The lower edge of another
muqarnas cupola is visible at the top. The
mihrab, which dates from the Almoravid (12th-century) expansion, is decorated with carved and painted stucco, as well as several windows of coloured glass. The
mihrab niche itself is a small alcove which is covered by a small dome of
muqarnas (stalactite or honeycomb-like sculpting). On each side of the
mihrab's opening is a pair of
engaged marble columns topped by deeply carved capitals. These capitals are spolia from al-Andalus, dating from the time of the Caliphate of Córdoba, which were re-appropriated by the Almoravids for Ali Ibn Yusuf's expansion of the mosque. On the mihrab's façade, the stucco ornamentation of the lower parts, immediately around the arch itself, was most likely redone in the 18th and/or early 19th centuries. The stucco decoration of the upper wall above this still dates from the Almoravid period. The Almoravid decoration prioritizes floral motifs, which contain more diversity than the later restorations below, over which bands of Kufic inscriptions have also been carved. The central nave that runs along the axis of the
mihrab is distinguished from the rest of the mosque by a number of architectural embellishments. The arches that run along it are of varying shapes, including both
horseshoe arches and multi-lobed arches. Instead of the plain timber ceilings, most sections of the nave are covered by a series of intricate
muqarnas ceilings and cupolas, each slightly different from the other, as well as two "ribbed" dome cupolas (similar to the domes of the
Great Mosque of Córdoba and
Cristo de la Luz Mosque in
Toledo) dating from the Almoravid and 'Alawi periods. The muqarnas vaults are made of plaster and are suspended from a hidden framework of wooden struts above them. Many of the
muqarnas compositions are further embellished with intricate
reliefs of
arabesques and
Arabic inscriptions in both
Kufic and cursive letters, highlighted with blue and red colours. Additionally, there are several elaborately carved bronze chandeliers hanging in the nave which were gifted to the mosque during the Almohad and Marinid eras; at least three of which were made from bells (probably church bells) brought back from victories in Spain. To the right of the
mihrab is the
minbar of the mosque, which could also be stored in a small room behind a door in the
qibla wall. The
minbar is most likely of similar origins as the Almoravid
minbar of the Koutoubia Mosque, made by a workshop in Córdoba not long after the latter and installed in al-Qarawiyyin Mosque in 1144 (at the end of the Almoravid works on the mosque). It is another exceptional work of marquetry and woodcarving, decorated with geometric compositions, inlaid materials, and
arabesque reliefs. Aside from the embellishments of the central nave, the rest of the mosque is architecturally uniform, but there are some minor irregularities in the floor plan. For example, the arches in the western half of the prayer hall are shorter than those in the eastern half, and some of the transverse aisles are slightly wider than others. These anomalies have not been fully explained but they appear to have been present since the early centuries of the mosque; they may be due to early reconstructions or alterations which have gone unrecorded in historical chronicles.
Courtyard '') of the Qarawiyyin Mosque, including the central fountain and one of the
Saadian-era pavilions The courtyard (
sahn) is rectangular, surrounded by the prayer hall on three sides and by a gallery to the north. The floor is paved with typical Moroccan mosaic tiles (
zellij) and at the center is a fountain. From outside the mosque, the courtyard is accessed by the main northern gate, called
Bab al-Ward, whose vestibule is covered by a Marinid-era white dome which is fluted on the outside and covered in painted and carved stucco on the inside. Opposite this gate, situated on the mihrab axis, is the central entrance to the interior prayer hall, guarded by a carved and painted wooden screen called the
anaza which also acted as a symbolic "outdoor" or "summer" mihrab for prayers taking place in the courtyard. (These features are visible to visitors standing outside the gate.) Both this entrance to the prayer hall and the outer gate across from it have facades decorated with carved and painted stucco. At the western and eastern ends of the courtyard stand two ornate Saadian pavilions each sheltering another fountain. The pavilions have pyramidal domes and emulate the pavilions in the Court of the Lions in the
Alhambra (
Spain). They are decorated with carved wood and stucco, mosaic-tiled walls, and marble columns. Behind these pavilions are extensions of the main prayer hall divided into four naves by rows of arches. The gallery and arched hall on the northeastern sides of the courtyard are a prayer space reserved for women.
Minaret The minaret was constructed in the 10th century under the sponsorship of the Umayyad caliph of Córdoba, Abd al-Rahman III. It overlooks the courtyard from the west. Along with the contemporary minaret of the
Mosque of the Andalusians, it is the oldest preserved minaret in Morocco. It was constructed in local limestone of relatively poor quality and was covered in whitewash by the Marinids in the 13th century in order to protect it from deterioration. It has a square shaft and is topped by a dome, as well as a parapet from which the
muezzin historically issued the call to prayer (
adhan). The full structure is 26.75 meters tall. One feature of the minaret is the lower window on its southern facade, which is shaped like a "triple" horseshoe arch, elongated vertically, which is unique to this structure. On the minaret's southern side, just above the gallery of the courtyard, is the Dar al-Muwaqqit.
Funerary annex (''Jama' al-Gnaiz'') A number of annexes are attached around the mosque, serving various functions. The northwestern edge of the building is occupied by latrines. Behind the southern
qibla wall, to the west of the
mihrab axis, is the ''Jama' al-Gnaiz
, which served as a separate oratory reserved for funerary rites. This type of facility was not particularly common in the Islamic world but there are several examples in Fez, including at the Chrabliyine and Bab Guissa Mosques. It was kept separate from the main mosque to preserve the purity of the latter as a regular prayer space, which could be soiled by the presence of a dead body. This oratory dates back to the Almoravid period and also features embellishments such as a muqarnas
cupola and a number of ornate archways in varying forms. Spoliated capitals from al-Andalus are also re-used here in the doorways leading from the prayer hall to the funerary annex and in the columns supporting the muqarnas'' cupola.
Library Behind the southern wall of the mosque and east of the
mihrab axis is the historic library of the mosque and university. It is sometimes cited as the world's oldest library that remains open. The library complex underwent another major restoration in recent years led by
Aziza Chaouni and was set to reopen in 2016 or 2017. == Status as world's oldest university ==