The Al-Qarawiyyin Mosque (also spelled Al Quaraouiyine or Karaouine) is the great mosque of Fes el-Bali, founded in the 9th century – in 859 according to the most widely cited date, by Fatima al-Fihri – and recognised by UNESCO and Guinness World Records as the seat of the oldest educational institution still in operation anywhere in the world. If you are not Muslim you cannot go inside, but you can see it through its doorways, from neighbouring rooftops and through the entrance of its library on Place Seffarine.
This page is written for the traveller who wants to understand what they are looking at when they stop in front of an open door of the Qarawiyyin: why the courtyard has pavilions that recall the Alhambra, why the mihrab’s columns carry capitals brought from al-Andalus, what to make of the title “oldest university in the world”, and how to see as much as possible without ever crossing a threshold that is not open to you. We have cross-checked heritage sources, recent scholarship and first-hand experience in the medina of Fes (often written Fez in English), and we flag clearly what remains uncertain.
At a glance
- Tradition credits the founding of the Qarawiyyin to Fatima al-Fihri, daughter of a wealthy emigrant from Kairouan, in 857 or 859; some historians now question this account.
- Guinness World Records names the University of Karueein, founded in 859 in Fes, as the oldest existing and continually operating educational institution in the world.
- The mosque covers about half a hectare, can hold roughly 22,000 worshippers and has, by one count, 18 gates and entrances.
- The interior is reserved for Muslims: non-Muslim visitors look in from the doorways without entering.
- Today’s prayer hall is mainly the result of the great Almoravid rebuilding of 1134 to 1143; the minaret dates from 956 and the courtyard pavilions from 1587-1588 and 1609.
- The library, founded in 1349 by the Marinid sultan Abu Inan, was restored by architect Aziza Chaouni at the request of the Ministry of Culture (work began in 2012, reopening in 2016).
- The modern university, created by royal decree in 1963, has its faculties outside the mosque, in Fes and four other Moroccan cities.

History of the Al-Qarawiyyin Mosque, from neighbourhood oratory to the great mosque of Fes
To grasp the Qarawiyyin’s place, remember that Fes grew out of two twin towns separated by the Fes river: the Andalusian bank, settled by emigrants from Córdoba, and the Kairouan bank, settled by families from Kairouan in present-day Tunisia. The mosque’s very name, al-Qarawiyyin, means “the one of the people of Kairouan”. It began as a neighbourhood mosque, not a state one.
Fatima al-Fihri: what tradition says, what historians debate
The story handed down by medieval chronicles is well known: Fatima al-Fihri, heiress of a prosperous Kairouani merchant, is said to have devoted her fortune to building an oratory in her quarter in 857 or 859 (245 AH for the most quoted date). Her sister Mariam is linked, in the same tradition, to the Andalusian Mosque on the other bank.
That account is no longer accepted without qualification. During 20th-century works, a 9th-century foundation inscription carved in cedar wood came to light; it names Dawud ibn Idris and gives the date 877. Historian Chafik Benchekroun has argued that it may be the original foundation inscription of the Qarawiyyin itself, which would make Fatima al-Fihri a figure perhaps more legendary than historical. The debate is unresolved. Our view: Fatima’s story belongs to the identity of the city and of Morocco and deserves telling, as long as it is presented as a tradition rather than a notarised deed.
956: the Zenata minaret
In the 10th century Fes was contested between the Fatimids and the Umayyads of Córdoba. In 956 the Zenata emir Ahmad ibn Abi Said obtained the Umayyad caliph’s permission to enlarge the mosque. The works took in the area of the present courtyard and replaced the old minaret with a taller tower on a square shaft. That minaret is the one you see today: it is among the oldest standing minarets in the Maghreb, and its square form anticipates the great Maghrebi and Andalusian minarets of later centuries. The Marinids restored it in 1286.
1134-1143: the Almoravid project that shaped the prayer hall
The decisive moment was Almoravid. Under the patronage of the emir Ali ibn Yusuf, between 1134 and 1143, the prayer hall was extended southwards and brought to ten transverse aisles. The central nave, which runs perpendicular to the qibla wall up to the mihrab, received exceptional decoration: domes and vaults of muqarnas, the honeycomb or stalactite-like carved cells, along with arabesques and Kufic inscriptions. A new minbar, the pulpit for the Friday sermon, was installed in 1144; it is a masterpiece of marquetry and carved wood with geometric designs.
The Almohad episode: decoration hidden under plaster
The Almohads, who took Fes in 1145-1146, preached strict austerity. Chronicles report that the inhabitants covered the richest decoration with whitewash before the new rulers arrived, to spare it from destruction. Paradoxically, it was also an Almohad sovereign, Muhammad al-Nasir (1199-1213), who commissioned the great bronze chandelier that still hangs in the central nave, described by earlier writers as the finest in the Islamic world.
The Marinids: the scholarly golden age
In the 13th and 14th centuries, under the Marinids, the Qarawiyyin reached its intellectual peak. Law, theology and language were taught, but so were grammar, rhetoric, logic, medicine, mathematics, astronomy and geography. The sultans built madrasas around it that served mainly as residences and specialised schools for students: Seffarine in 1271, Al-Attarine in 1323, Misbahiya in 1346. In 1286 the Dar al-Muwaqqit, the timekeeper’s chamber, was set up at the foot of the minaret, equipped with astrolabes and water clocks to fix prayer times; one water clock was commissioned in 1317-1318, another completed in 1361. Finally, in 1349, Sultan Abu Inan officially founded the library at the north-eastern corner.
The Saadians: two pavilions in the courtyard
The last major visible addition is Saadian. Ahmad al-Mansur had the eastern pavilion of the courtyard built in 1587-1588; his grandson Abdallah al-Ghalib II added the western pavilion in 1609. Both kiosks, with their slender columns and pyramidal roofs, emulate those of the Court of the Lions in the Alhambra in Granada. They are among the sights most easily glimpsed from certain doorways.
| Date | Dynasty or period | Event |
|---|---|---|
| 857 or 859 | Idrisid | Founding traditionally credited to Fatima al-Fihri (account debated) |
| 877 | Idrisid | Date of the cedar inscription naming Dawud ibn Idris |
| 956 | Zenata emirs, under Umayyad authority | Enlargement and present minaret |
| 1134-1143 | Almoravid | Prayer hall extended to ten aisles, muqarnas domes |
| 1144 | Almoravid | New minbar in inlaid wood |
| 1199-1213 | Almohad | Great bronze chandelier of the central nave |
| 1286 | Marinid | Minaret restored, Dar al-Muwaqqit created |
| 1289 | Marinid | Anaza, the wooden screen at the entrance of the hall, installed |
| 1349 | Marinid | Library officially founded by Abu Inan |
| 1587-1588 and 1609 | Saadian | Eastern and western courtyard pavilions |
| 1947 | Protectorate | Integrated into the state education system |
| 1963 | Independent Morocco | Turned into a university by royal decree |
| 2012-2016 | Contemporary | Library restored by Aziza Chaouni |
“Oldest university in the world”: what the title really covers
The phrase is everywhere, often distorted. Here are the facts. Guinness World Records names the University of Karueein, founded in 859 in Fes, as the oldest existing and continually operating educational institution in the world, and notes that the oldest in Europe is Bologna (1088). UNESCO, in its description of the medina of Fes, inscribed on the World Heritage List in 1981, states that the city is home to the oldest university in the world.
The nuance lies in the word “university”. For more than a thousand years the Qarawiyyin was a mosque where scholars taught in study circles, leaning against a pillar, and granted their students an ijaza, a personal licence to transmit a text. It was not a university in the European sense, with faculties and institutional degrees. Reform came late: under the French Protectorate, between 1914 and 1947, the structure changed and the ijaza was replaced by a diploma (shahada); in 1947 the institution was integrated into the state education system; in 1963 a royal decree officially made it a university, renamed the University of Al Quaraouiyine in 1965. Other institutions, such as the Zitouna in Tunis, claim comparable or greater age. The most honest position: the Qarawiyyin is one of the oldest continuously active centres of learning in the world, and recognition by UNESCO and Guinness makes it the most widely cited reference.
And where do students study today?
Don’t look for lecture theatres in the medina. Since 1963 university teaching has moved from the mosque to modern campuses, and the university presidency is based in Fes. The faculties are spread between Fes and Agadir (Sharia), Marrakech (Arabic language), Tetouan (foundations of religion) and Smara. Inside the mosque itself, traditional teaching was restored in 1988 under King Hassan II after a break of nearly thirty years, and several restored Marinid madrasas once again house students. When you see young people with books slipping through a side door, it is not stage dressing: the institution is alive.
Tradition links figures such as Ibn Khaldun and Maimonides to the Qarawiyyin, and a persistent legend has Gerbert of Aurillac, the future Pope Sylvester II, studying there; modern scholarship has found no evidence for it. Take these names as a sign of the place’s prestige in the medieval Mediterranean, not as proven facts.
Architecture of the Al-Qarawiyyin Mosque: knowing what to look for
The paradox of the Qarawiyyin is that it cannot be seen from outside. There is no monumental façade and no forecourt: the mosque is wrapped in the fabric of the medina, surrounded by shops, fondouks and madrasas. You sense it through its green-tiled roofs, its minaret and its doors. Hence the value of arriving with a clear idea of the layout.
The layout: a hypostyle hall and a courtyard
The mosque covers about half a hectare. The prayer hall is a vast forest of arches divided into ten transverse aisles running parallel to the qibla wall on the south side. The courtyard (sahn) is rectangular, enclosed by the prayer hall on three sides and by a gallery to the north. It is paved with zellij tilework, with a central fountain and the two Saadian pavilions at either end. This arrangement, with an elongated courtyard set across the hall, is typical of the great mosques of the western Islamic world.
The central nave, the mihrab and the minbar
The axial nave is the artistic heart of the building. Its Almoravid muqarnas domes are among the earliest examples of the technique in the Maghreb. The mihrab, the niche marking the direction of Mecca, is decorated with carved and painted stucco and coloured glass, and topped by a small muqarnas dome. The capitals of the marble columns framing it are spolia from al-Andalus, dating from the Caliphate of Córdoba: a detail that says everything about the ties between Fes and Muslim Spain. The minbar of 1144 is regarded as one of the major works of medieval Islamic woodwork.
The chandeliers: war booty turned into light
Several bronze chandeliers light the hall. Besides the great Almohad chandelier, others were made from bells brought back from military campaigns in the Iberian Peninsula, such as the large chandelier installed in 1337, made from a bell taken from Gibraltar. The story is well known, but it is not one to tell loudly in front of a mosque door: save it for lunch.
The minaret and the timekeeper’s chamber
The minaret of 956 is sober and massive, without the ceramic decoration of the city’s later minarets. At its foot, the Dar al-Muwaqqit of 1286 housed the muwaqqit, the scholar responsible for calculating prayer times with astrolabes and water clocks. This scientific role, on the border between astronomy and worship, is one of the best illustrations of what the Qarawiyyin was in the Middle Ages.
The gates, the visitor’s only windows
By one count the mosque has 18 gates and entrances. A few are worth locating:
- Bab al-Ward (Gate of Roses), the main northern gate, topped by a Marinid-era dome fluted on the outside; it opens onto the courtyard and often gives the best view of the zellij and the fountain.
- Bab al-Shama’in (Gate of the Candle-makers) and Bab al-Maqsura, on the north-west side, which keep ornate Almoravid-period door knockers.
- Bab al-Hafa (Gate of the Barefooted), an Almohad gate with a water channel for washing the feet.
- Bab al-Gnaiz, leading to the funerary annex where prayers for the dead are held; its present doors are replicas made in the 1950s.
At the entrance of the prayer hall, on the courtyard side, a carved and painted wooden screen of 1289, the anaza, served as a “summer” mihrab for open-air prayer. If a door on the north side is open, look for it on the axis: it is often the most visible piece of the interior.

The Al-Qarawiyyin library and its restoration by Aziza Chaouni
The library was officially founded in 1349 by the Marinid sultan Abu Inan, at the north-eastern corner of the mosque; the present building stands on the south side, with its entrance on Place Seffarine. It has preserved famous pieces: volumes of Imam Malik’s Muwatta copied on gazelle parchment, and the copy of the Kitab al-Ibar that Ibn Khaldun himself is said to have given to the institution. According to press reports, its holdings include several thousand manuscripts, among them a 9th-century Qur’an in Kufic script; no detailed official inventory is published online. A major extension was carried out in the 1940s, with a new reading room inaugurated in 1949.
In 2012 the Ministry of Culture commissioned the Fes-born architect Aziza Chaouni to rehabilitate the building. She found manuscript rooms with no temperature or humidity control, cracks in the ceiling, a blocked drainage system, broken tiles, split beams and exposed electrical wiring. The work lasted more than three years. It added a laboratory for restoring and digitising manuscripts, offices, a reading room, a conference room, a café, solar panels and a water-collection system for irrigating the garden. The courtyard fountains were restored and new lighting installed.
The reopening took place in May 2016. Aziza Chaouni has said that her main battle was opening the place to the public, echoing the mission attributed to Fatima al-Fihri. In practice, access for the passing visitor varies: the manuscript room is reserved for researchers, and you generally cannot count on wandering freely through the interior. Go to the entrance on Place Seffarine, ask politely and accept the answer: sometimes a look into the vestibule, sometimes a no.
Visiting the Al-Qarawiyyin Mosque as a non-Muslim
In Morocco, access to active mosques is reserved for Muslims; the Hassan II Mosque in Casablanca, with its guided tours, is the best-known exception. The Qarawiyyin is no exception to the rule: a non-Muslim does not enter, even with a guide. That does not mean there is nothing to see.
What is accepted and what is not
- Looking in from the lane, in front of an open door, is tolerated: every visitor does it.
- Stepping onto the threshold, even for a photo, is not. The threshold is the limit.
- Photographing the empty courtyard without flash is generally accepted; photographing worshippers at prayer, or anyone up close without consent, is not.
- During the call to prayer and the prayer itself, especially at midday on Friday, move away from the doors: worshippers stream in and you are in the way.
Where to get the best view of the Qarawiyyin
First viewpoint: the northern doors, in the Attarine souk area. Coming down the Talaa Kebira you reach the Al-Attarine Madrasa, and the mosque doors are a few steps away. When they are open, the view reaches into the courtyard, its zellij, the fountain and the Saadian pavilions. Second: the Place Seffarine side, to the south-east, where the library entrance is. Third, and most spectacular: the rooftops. Several shops, cafés and houses in the neighbouring lanes offer access to their roof, from which you can see the green roofs, the minaret and sometimes part of the courtyard. It is often free in exchange for a look around the shop or a tip; agree on the terms before you go up. The opening photo on this page was taken from a rooftop of this kind.
Door opening times are not posted for visitors: they open for prayers and are sometimes closed in the afternoon. The hours around the midday and afternoon prayers are usually the most promising, but nothing is guaranteed. If one door is shut, walk round: another may be open.
| Item | Practical information |
|---|---|
| Location | Heart of Fes el-Bali, between the Attarine souk (north) and Place Seffarine (south-east) |
| Interior access | Reserved for Muslims; no interior visits offered to non-Muslims |
| Price | No ticket to see the mosque from the doors; library: terms not officially published |
| Opening times | Doors open around prayer times, with no hours published for visitors; check on site |
| Dress | Shoulders and knees covered, out of respect, even when looking in from the street |
| Time needed | 20 to 40 minutes to walk round the doors; 1 hour with a rooftop and Place Seffarine |
| Best time | Weekday mornings; avoid Friday around midday |
| Photos | No flash, no people at prayer, never from the threshold |
How to reach the Al-Qarawiyyin Mosque
No cars enter this part of the medina: you always finish on foot. Two approaches work well.
- From Bab Boujloud: take the Talaa Kebira, the main street that slopes gently down towards the heart of the medina. Allow roughly 15 to 25 minutes depending on crowds and stops. The street leads into the Attarine souk area; the Al-Attarine Madrasa and the mosque’s northern doors are then a few steps away.
- From Place R’cif: the shortest approach if your taxi drops you at the lower end of the medina. Walk up to Place Seffarine, recognisable by the sound of coppersmiths hammering; the library entrance opens onto the square. Allow about ten minutes.
If you are flying in, Fes-Saiss Airport lies about fifteen kilometres south of the city; ask the taxi to drop you at Bab Boujloud or R’cif depending on where your riad is. In the lanes, map apps are often wrong: rely on the tourist-trail signs and the landmarks given here, and be wary of self-appointed “guides” who claim the way ahead is closed.
Around the Qarawiyyin
The mosque is the centre of gravity of a quarter where monuments stand shoulder to shoulder. It makes sense to plan half a day around it.
- The Al-Attarine Madrasa (1323), just to the north and open to visitors: this is where you see, from the inside, the Marinid decoration you cannot see in the mosque. Our page on the Al-Attarine Madrasa covers the visit.
- Place Seffarine and its madrasa (1271), the oldest of the Marinid madrasas of Fes, opposite the library entrance.
- The Misbahiya Madrasa (1346), another Marinid student residence linked to the mosque.
- The Cherratine Madrasa, built in the Alaouite period, a few minutes’ walk away: see our page on the Cherratine Madrasa.
- The souks that hem in the mosque: spices, babouches, copper. To find your way, read our guide to the souks of Fes.
To place the Qarawiyyin within the old city as a whole, our page on the Fes el-Bali medina gives the main landmarks, and our guide to things to do in Fes helps you plan a stay of two or three days.
Mistakes to avoid
- Paying someone who promises to “get you in”: it is impossible and embarrasses everyone.
- Confusing the mosque with the madrasas: the mosque cannot be visited, the Al-Attarine Madrasa can.
- Arriving around noon on a Friday hoping for good photos: it is the time of the main weekly prayer and the doors are packed.
- Repeating “the oldest university in the world” as an absolute fact: the title rests on genuine recognition but covers a reality very different from today’s universities.
- Going up to a rooftop without agreeing a price: negotiate before, not after.
- Forgetting you are in a place of prayer: keep your voice low and your camera discreet near the doors.
FAQ about the Al-Qarawiyyin Mosque
Can non-Muslims enter the Al-Qarawiyyin Mosque?
No. The interior is reserved for Muslims, as in most active mosques in Morocco. Non-Muslim visitors look in from the street, in front of open doors, without crossing the threshold.
Is the Qarawiyyin really the oldest university in the world?
Guinness World Records names it the oldest existing and continually operating educational institution, founded in 859, and UNESCO refers to the oldest university in the world. But it only became a university in the modern sense in 1963, and other institutions claim comparable age.
Who founded the Qarawiyyin?
Tradition credits Fatima al-Fihri, daughter of a merchant from Kairouan, in 857 or 859. A 9th-century inscription naming Dawud ibn Idris and the date 877 has led some historians to qualify this account.
Can you visit the Qarawiyyin library?
The library, restored by Aziza Chaouni and reopened in 2016, was designed with spaces open to the public, but the manuscript room is reserved for researchers and tourist access remains variable. Go to the entrance on Place Seffarine and ask on site.
What is the best place to see the mosque?
The northern doors, near the Al-Attarine Madrasa, often give the best view of the courtyard. For an overview of the green roofs and the minaret, go up to a neighbouring shop or café rooftop, after agreeing the terms.
Do you have to pay to see the Qarawiyyin?
No, looking in from the doors is free. Only private rooftops sometimes come at a price, in the form of a tip or a purchase in the shop.
How many people can the mosque hold?
The commonly cited capacity is about 22,000 worshippers, over an area of roughly half a hectare.
Summary
The Qarawiyyin is not a monument you tour; it is a monument you learn to look at. It concentrates eleven centuries of the history of Fes: the oratory of the Kairouan families, the Zenata minaret of 956, the Almoravid prayer hall, the chandeliers, Abu Inan’s library, the Saadian pavilions and, since 1963, a modern university whose faculties are elsewhere. Non-Muslims do not go inside, but a well-planned morning – northern doors, Place Seffarine, a rooftop, the Al-Attarine Madrasa – is enough to grasp the essentials. Bring time, discretion and modest dress: this is a living mosque before it is a sight.
Official sources
- UNESCO World Heritage Centre: Medina of Fes
- Guinness World Records: oldest higher-learning institution
- ArchNet: Jami’ al-Qarawiyyin
- ArchNet: Al Qaraouiyine library rehabilitation
- Ministry of Habous and Islamic Affairs: University of Al Quaraouiyine
This article is for information only. Access conditions, door and library opening times and any fees may change; check them on site before your visit. Last updated: September 2026.
Photo credits
Images: featured image « File:Qarawiyyin Mosque DSCF4250.jpg » — R Prazeres (CC BY-SA 4.0); « File:Fez Al-Qarawiyyin mosque (54247785576).jpg » — Jorge Franganillo (CC BY 2.0); « File:Qarawiyyin library gate on Place Seffarine 02.jpg » — Robert Prazeres (CC BY-SA 4.0), via Wikimedia Commons.



