Fes · Fes el-Bali, the centre of the old city
Al-Qarawiyyin
Mosque · No ticket · A few minutes at each gate as part of a walk
Al-Qarawiyyin at a glance
- What it is
- Mosque in Fes
- Entry
- No ticket
- Hours
- Check locally; they change in Ramadan
- Allow
- A few minutes at each gate as part of a walk; it is seen from the lanes, not visited inside.
- Built
- Founded as a mosque by Fatima al-Fihri in 857 or 859, according to the chronicle Rawd al-Qirtas; enlarged in 956, in 1134 to 1143 under the Almoravid ruler Ali ibn Yusuf, and embellished by later dynasties.
- UNESCO
- Inside the Medina of Fez, inscribed on the World Heritage List in 1981.
- When to go
- Outside prayer times, when the gates stand open and you are not in the way of worshippers.
- From the centre
- Walk Talaa Kebira to its end at the Attarine Madrasa and turn right: the lane runs along the mosque's walls past its gates and down to Place Seffarine.
- Dress
- Shoulders and knees covered in the lanes around the mosque, as everywhere in Fes el-Bali.
- Access
- The lanes around the mosque are level by Fes standards; the view through Bab al-Ward needs no steps.
Fatima al-Fihri, a merchant's daughter, founded al-Qarawiyyin as a mosque in 857 or 859; her family had come to Fes from Kairouan. It grew into the main mosque of the city and its centre of Islamic learning, and since 1963 it has been part of Morocco's state university system. The mosque is closed to non-Muslims; visitors see its courtyard through the open gates.
In short
Al-Qarawiyyin is the great mosque and university at the centre of Fes el-Bali, founded in 857 or 859 by Fatima al-Fihri. Non-Muslims cannot enter the mosque, but from Bab al-Ward on the north side you can look across the tiled courtyard to the carved wooden screen of the prayer hall. There is no ticket.
The visit, stop by stop
Al-Qarawiyyin in the order you walk it
-
Bab al-Ward, the north gate
The main gate into the courtyard is Bab al-Ward, beside the Attarine Madrasa. Its doors are wood faced with bronze from the Almoravid period; they keep original pieces and were restored between 2005 and 2007. The vestibule behind is covered by a white Marinid dome, fluted outside and carved inside.
-
The view across the courtyard
From outside Bab al-Ward you look straight across the courtyard: a floor of zellij with a fountain at its centre and, opposite, the central entrance to the prayer hall behind a carved and painted wooden screen called the anaza, which serves as an outdoor mihrab for prayers in the courtyard.
-
Bab al-Hafa and its water channel
Just west of Bab al-Ward is Bab al-Hafa, the Gate of the Barefooted, from the Almohad era. A small channel of water crosses the floor inside it so that worshippers could wash their feet as they came in.
-
The minaret from the lanes
The minaret overlooks the courtyard from the west. It was built in the 10th century with the support of the Umayyad caliph of Cordoba, Abd al-Rahman III, and with the minaret of the Andalusians' Mosque it is the oldest preserved minaret in Morocco. The Marinids whitewashed it in the 13th century to protect its soft limestone.
-
The library door on Place Seffarine
On the south side, facing Place Seffarine and its coppersmiths, is the entrance to the library under a green-tiled wooden canopy. This entrance, built outside the mosque in the 1940s, is what made the library accessible to non-Muslims.
Photos in this section: Robert Prazeres (CC BY-SA 4.0), via Wikimedia Commons (photo credits).
Its founding and its founder
The Rawd al-Qirtas, a chronicle by Ibn Abi Zar, says Fatima al-Fihri founded the mosque in 857 or 859. She was the daughter of Mohammed al-Fihri, a wealthy merchant whose family had moved from Kairouan, in present-day Tunisia, to Fes early in the 9th century and settled among other Kairouan families in a western district of the city. The name Qarawiyyin means the people of Kairouan.
From a neighbourhood mosque to the city's great mosque
The first building measured about 36 by 32 metres, with four aisles. It was enlarged on three sides in 956, when the Umayyad caliph of Cordoba paid for the work, and again between 1134 and 1143, when the Almoravid ruler Ali ibn Yusuf added three more aisles to reach ten. Later dynasties added the bronze doors, the courtyard pavilions and the library rooms, so the building you walk around today holds work from more than a thousand years. Tradition made the Qarawiyyin's call to prayer the one by which the other mosques of Fes set theirs.
Mosque and university: one place, two roles
Teaching grew up inside the mosque. Historians disagree on when it began: Abdelhadi Tazi gives 1121 as the earliest clear evidence, Mohammed al-Manouni places it under the Almoravids, and Évariste Lévi-Provençal under the Marinids. The Marinids then built colleges around the mosque, the Saffarin in 1271, the Attarine in 1323 and the Mesbahiyya in 1346, to lodge its students. Scholars connected with the Qarawiyyin as students or teachers include Ibn Khaldun, Ibn al-Khatib and Leo Africanus.
The "oldest university" claim, and who makes it
UNESCO's entry for the Medina of Fez has described the Qarawiyyin as the oldest university in the world, and Guinness World Records lists it as the oldest existing, continually operating educational institution. Many historians draw a line between a madrasa and a university, and date the Qarawiyyin's change into a university to its reorganisation in 1963. We give the claim with its sources and leave the debate to them.
Who studies here now
Teaching concentrates on the Islamic religious and legal sciences, with strengths in classical Arabic grammar and Maliki law, and is still delivered in traditional ways. Students come from across Morocco and from Muslim West Africa. Women were first admitted in the 1940s.
What visitors can see
The prayer hall and the courtyard are for Muslims. Non-Muslim visitors see the mosque from its gates, and there is nothing to pay. Stand to one side of the doorway, do not step over the threshold, and do not photograph people at prayer; at prayer times, move on and come back later. Opening of the gates follows the prayer day, so check locally.
Through the doors to the courtyard
Bab al-Ward, the north gate, gives the clearest view: through it you see the courtyard, the central fountain and the anaza screen in front of the prayer hall, whose doorway is framed in carved and painted stucco. The Saadian pavilions at either end of the courtyard are visible from the gates on those sides. A guide helps here, because the gates are spread round a building that is surrounded by houses and shops, with no open space to step back into.
The library and its restoration
Sultan Abu Inan founded the library in 1349. Its present building dates mainly from an expansion begun in 1940 under King Mohammed V and opened in 1949, with a reading room 23 metres long under a painted wooden ceiling and the separate entrance on Place Seffarine. It holds manuscripts that include volumes of the Muwatta of Malik on gazelle parchment, a 9th-century Quran and the copy of Ibn Khaldun's Kitab al-Ibar that he gave in 1396. A restoration led by the architect Aziza Chaouni was due to finish in 2016 or 2017. Whether visitors can enter the reading room on a given day is not published, so check locally.
The streets around it
The Qarawiyyin sits inside a ring of markets. To the north-west, Talaa Kebira ends at the Attarine Madrasa and the roofed spice market. To the south, the library door opens onto Place Seffarine, where coppersmiths have kept workshops since at least the 16th century and the Saffarin Madrasa of 1271 opens its door. Beyond it the lanes drop towards the Bou Khrareb river and the Chouara tannery on its bank. Just west is the shrine of Moulay Idris II, whose sanctuary was historically closed to non-Muslims and pack animals; its edge is marked by a carved gateway.
That makes the mosque the turning point of most guided walks in Fes el-Bali: down Talaa Kebira in the morning, round the Qarawiyyin's gates at midday, then out to the crafts quarters and the tanneries in the afternoon.
Look closer
What to notice inside the Al-Qarawiyyin
Eighteen ways in
By one count the mosque has 18 gates and entrances round its walls, from small square doorways to huge horseshoe arches roofed over the street.
Bronze on the doors
Several gates keep Almoravid bronze fittings, among the oldest bronze work in Moroccan architecture; the doors of Bab al-Gnaiz and Bab Sbitriyyin are 1950s replicas, with fragments of the originals at the Dar Batha Museum.
The Saadian pavilions
At the east and west ends of the courtyard stand two pavilions with pyramid roofs, each over a fountain, added in 1587 to 1588 and in 1609 on the model of the Court of the Lions in the Alhambra.
The Tower of the Trumpeters
Next to the mosque stands the Borj Neffara, an observation tower that people take for a minaret; it belonged to a timekeeper's house.
Walk on
Pair the Al-Qarawiyyin with these, in this order
- 1
Al-Qarawiyyin
You are here. Start at opening time.
- 2
Al-Attarine Madrasa
The Marinid college beside Bab al-Ward was built to lodge Qarawiyyin students, and you can go inside.
- 3
Nejjarine Museum
The carpenters' square and its museum of woodwork are a few lanes west, off the end of Talaa Kebira.
- 4
Shopping in Fes
Place Seffarine, at the library door, is the coppersmiths' square, and the lanes beyond lead down to the Chouara tannery.
More in Fes, and routes through it
- FesNights, routes, day trips and weather
- Al-Attarine MadrasaZellij, Stucco, Visiting
- Nejjarine Museum of Wooden ArtsWoodwork in an Old Fondouk
- Bou Inania MadrasaCourtyard, Water Clock, Visit
- One day in FesA Medina Walking Plan with a Guide
- Shopping in FesPottery, Leather, Brass, Weaving
- Morocco tours from Fes
- Imperial cities tour
- 10 days in Morocco
- Fes airport transfer
- Is Morocco safe
Sources, dates checked and photo credits
Sources
- Wikipedia, University of al-Qarawiyyin checked 3 Dec 2026
- Wikipedia, Fes el Bali checked 3 Dec 2026
- Wikidata checked 3 Dec 2026
Drive times come from our route planner, door to door by private car without stops. Each source shows the date we last checked the facts on this page against it.
Photos: The bronze-plated door of Bab al-Ward: Ideophagous, CC BY-SA 4.0; The horseshoe-arched entrance to the Qarawiyyin library on Place Seffarine in Fes: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons (photo credits).
Questions
Al-Qarawiyyin: questions before you go
Can non-Muslims go inside the Qarawiyyin Mosque?
Who founded al-Qarawiyyin?
Is al-Qarawiyyin the oldest university in the world?
Can tourists visit the Qarawiyyin library?
Ask for a quote
See the Qarawiyyin quarter with a guide
Tell us your dates and who is travelling. We plan the route, give your guided Fes day its midday round the Qarawiyyin's gates and the Attarine, and send one quote.
Thank you, traveller. Your request is with the planners.
A planner replies on WhatsApp within one working day, usually sooner, with a day-by-day plan and one quote for your group. To add something, message us on WhatsApp at +212 701 664 704.
What happens next
- Send your dates and your group.A month, a rough route and a head count are enough to start.
- Get a day-by-day plan and one quote.Drive times, where you sleep, the vehicle and what is included, for your group only.
- Change it, or confirm it.Nothing is booked or charged until you say yes.
- A planner on our US desk or our team in Morocco writes back, depending on the hour you send.
- If your number is on WhatsApp, the reply comes there. If not, by phone or email.
- Your details go only to the operator named at the foot of this page.