Al-Qarawiyyin from its doorways
The great mosque at the heart of Fès is closed to non-Muslims, but its doors stand open onto the lanes. With patience you can learn a great deal from the thresholds.

- From Bab Bou JeloudAbout thirty minutes downhill on foot
- PaceEasy
- The way inDownhill to the centre of the medina
- BringModest clothing and a respectful pace
At the centre of Fès el-Bali stands a building you can walk around but not into. Al-Qarawiyyin is the city's great mosque and one of the oldest centres of learning in the world. It is so tightly embedded in the lanes that you can pass several of its doors without seeing the building as a whole. For non-Muslims, those doors are the way to know it.
A ninth-century foundation
Al-Qarawiyyin was founded in the middle of the ninth century, traditionally in 857 or 859, by Fatima al-Fihri. She belonged to a family that had moved to Fès from Kairouan, in present-day Tunisia, and the mosque's name means "of the people of Kairouan". Tradition says she used her inheritance to fund the building, and that she was closely involved in its construction.
The first mosque was modest. Over the following centuries it was enlarged many times, most notably in the twelfth century under the Almoravids, who extended the prayer hall and added much of its finest decoration. Later dynasties added fountains, pavilions and annexes. What stands today is the product of more than a thousand years of building and rebuilding.
Mosque and university
From early on, al-Qarawiyyin was a place of teaching as well as prayer. Scholars lectured in the mosque, students gathered around them, and the surrounding madrasas housed those who came from elsewhere. Law, theology, grammar, astronomy and mathematics were all taught here at various times. It is often described as one of the oldest continuously operating universities in the world.
In the twentieth century the teaching was reorganised into Morocco's modern university system, and the university of al-Qarawiyyin continues in that form. The mosque itself remains one of the most important in the country, and it is busiest at Friday prayers, when worshippers fill the courtyard and overflow into the lanes.

The library
The mosque's library was founded in the fourteenth century, under the Marinids, and over centuries it gathered a significant collection of manuscripts on religion, law, science and literature. Its entrance faces Place Seffarine, the coppersmiths' square, at the southern side of the complex.
In the 2010s the library underwent a thorough restoration, with new conservation spaces for the manuscripts and repairs to the building, and it reopened afterwards. It is primarily a working library for scholars. Access for casual visitors is limited, so do not count on going inside.
Close by: The Bou Inania madrasa
What you can see from the doors
Non-Muslims cannot enter al-Qarawiyyin, and this applies to the courtyard as well as the prayer hall. But the mosque has many doors, and on most days several stand open. From the threshold you can look in, and what you see changes from door to door.
- The courtyard. Some western doors line up with the courtyard, giving a view across marble paving towards fountains and the pavilions at either end, with arcades and green-tiled roofs above.
- The prayer hall. Other doors open into the forest of arches and columns, with mats on the floor and lamps hanging overhead.
- The doorways themselves. The doors are worth studying: heavy wooden leaves studded with metal, set in arches of carved plaster, often with carved and painted wooden ceilings over the lane in front.
Stand to one side, keep your voice down, and do not block the entrance. People come and go constantly. Photographs of the architecture through an open door are usually tolerated, but never photograph worshippers, and lower your camera if anyone signals that you should.

Seeing the roofs from above
The long green-tiled roofs of al-Qarawiyyin are one of the landmarks of the Fès skyline. You cannot climb onto them, but you can catch glimpses from some of the surrounding buildings. The upper level of the al-Attarine madrasa, when it is open, has long been a favourite viewpoint. Terraces around the medina sometimes give a partial view too.
From the hills around the city, the mosque's minaret and roofs can also be picked out among the rooftops, if you know where to look. It helps to have walked around the building first, so that the shape seen from above makes sense.
Walking around the mosque
A slow circuit of the outer walls is the best way to grasp the size of al-Qarawiyyin. The building is surrounded by markets and lanes rather than open space, so you have to piece it together door by door. Along the way you pass the al-Attarine madrasa, the spice market, Place Seffarine and the library entrance.
Some practical points:
- Avoid prayer times. The doors are crowded at prayer times, especially at Friday midday, and it is respectful to keep clear.
- Dress modestly. Even outside, you are standing at the entrance of a mosque.
- Ask directions to a landmark. "Qarawiyyin" is the word everyone knows, and most people will point you there. Our guide to finding your way in Fès el-Bali has more on navigating the lanes.
- Be patient. Doors open and close through the day. If one is shut, another may be open a few minutes' walk away.
Al-Qarawiyyin rewards a gentle kind of attention. You will not tick it off in the way you tick off a museum. You see it in pieces, through doorways, across roofs and in the life of the lanes around it, and the picture builds slowly.