⭐ Must-see · Fes el-Bali, 6 km from central Fes
Al-Qarawiyyin Mosque and University
The quiet heart of a thousand years of learning
🎧 Listen to this guide · about 5 min
Pop your earphones in and we'll walk you round.
Welcome to the Qarawiyyin. You cannot miss it, and yet you cannot quite see it. It is so big, and so tightly wrapped by houses and shops, that it has no grand facade. Instead you find it through its doorways, scattered around its walls. Stop at one and look in. You will see white arches running into the shade, a courtyard of tiles, a fountain, people washing and praying. Please know one thing first. Non-Muslims may not enter this mosque, or most mosques in Morocco. But you are welcome to look in respectfully from the doorway, and that view alone is worth the walk. This building is the reason Fes became a city of scholars.
The story of Al-Qarawiyyin Mosque and University
The story most often told is that the mosque was founded by Fatima al-Fihri, a woman from a family that had moved to Fes from Kairouan in what is now Tunisia. According to the chronicler Ibn Abi Zar, she founded it in 857 or 859. Some historians question that account, and a foundation inscription points to 877, under the Idrisid ruler Dawud ibn Idris. Either way, the mosque took its name from Kairouan, and the people who had come from there. In 1981 UNESCO inscribed the Medina of Fez, with this mosque at its heart, as a World Heritage Site.
It grew with every dynasty. The biggest expansion came under the Almoravid ruler Ali ibn Yusuf, between 1134 and 1143. He extended the prayer hall, added a new mihrab, and installed a carved wooden minbar in 1144. Later, under the Saadians, two pavilions were added to the courtyard.
The Qarawiyyin was also a place of study for centuries. The Marinid sultan Abu Inan Faris founded its library in 1349. UNESCO and Guinness World Records have cited it as the oldest existing, continually operating higher learning institution in the world. Scholars point out that it became a university in the modern sense in 1963. In 2016 its library reopened after a restoration led by the Fes-born architect Aziza Chaouni.
The setting
The mosque covers a huge area in the lowest part of Fes el-Bali, near the Oued Fes. From outside you mostly see high plain walls, many doorways and a sea of green tiled roofs. Inside, rows of horseshoe arches divide the prayer hall into long aisles. The rectangular courtyard is paved with zellij and has a central fountain. At its east and west ends stand two Saadian pavilions, each sheltering a fountain, inspired by the Court of the Lions at the Alhambra in Granada. A square minaret rises above it all.
Why it matters
The Qarawiyyin is the spiritual and intellectual centre of Fes, and for long periods it was one of the most important centres of learning in the Islamic world. Scholars came here from across North Africa and beyond. The whole medina grew around it, with markets, madrasas and fountains placed close by. It is still an active mosque and still a place of study. Its story, with a woman named as its founder, is also a source of pride for many Moroccans today.
Your walk-through
The stops a guide would take you to, in order.
-
1
The main doorways
Start at one of the main doors. Stand to the side so you do not block anyone, and look in. You will see the courtyard, the arches and the fountain. Notice how cool and quiet it feels after the lanes. Remember that non-Muslims may only look from here. A small, respectful glance is welcome. Photos from the doorway are usually tolerated, but never of people praying.
-
2
The courtyard pavilions
If your doorway faces the courtyard, look for the two pavilions at either end. They were added by the Saadian dynasty and shelter fountains. Their slender columns and carved wood were inspired by the Alhambra in Granada. It is a reminder of how closely Fes was tied to Muslim Spain, and how many families came here from Andalusia.
-
3
The green roofs
Now step back and look up. From the lanes you can see the slopes of green glazed tile that cover the prayer hall. Green is a colour linked with Islam, and it marks the most important buildings in the medina. Later, from a rooftop terrace, you will see how vast these roofs are, rising and falling like a green sea.
-
4
The library entrance
On the Place Seffarine side stands the entrance to the library. The sultan Abu Inan founded it in 1349. Over centuries it gathered manuscripts on religion, law, astronomy and medicine. It declined in the nineteenth century, but it was rebuilt and expanded in the twentieth, and restored again recently. Today it reads as a working library for scholars, not a museum.
-
5
Place Seffarine
Finish in the little square of Place Seffarine, the coppersmiths' square. Listen to the hammers ringing on pots and trays. It is a small place, but it sums up Fes. On one side is a library linked to centuries of learning. All around are craftsmen doing the same work their grandfathers did. Sit for a moment and watch.
Things you might not know
- The carved wooden minbar of the Almoravid expansion was installed in 1144.
- Its two courtyard pavilions were modelled on those in the Alhambra's Court of the Lions.
- Its library was founded by the Marinid sultan Abu Inan Faris in 1349.
Researched November 2026 from: en.wikipedia.org, whc.unesco.org. Fees and hours change, so check on the day.