Fez

History

Al-Qarawiyyin: Centuries of Education, Still in Session

Al-Qarawiyyin is stitched so tightly into the fabric of Fes el-Bali that you can pass three of its fourteen doors without realising what you are walking past. The medina grew around it, then over it. What you get instead of a facade is a series of glimpses: a horseshoe arch framing a courtyard of white and black tile, a green pyramidal roof rising above the rooftops, the sound of recitation carried through a doorway on a street too narrow for two people to pass comfortably.

That is the whole story of this place, really. It was never designed to be looked at. It was designed to be used. And it has been in continuous use since the year 859.

The Woman Behind It (And What We Actually Know)

The traditional account goes like this. Fatima al-Fihri, daughter of a wealthy merchant from Kairouan in what is now Tunisia, came to Fes with her family during the ninth century. When her father and husband died, she inherited a fortune. Rather than keep it, she bought land near the spice market and commissioned a mosque for her community of Kairouanese exiles, naming it al-Qarawiyyin after the city they had left behind. Construction is usually dated to 857 to 859.

Here is the part most articles leave out, and it is worth knowing before you repeat the story at dinner.

The earliest surviving source for Fatima al-Fihri is Rawd al-Qirtas, a chronicle written by Ibn Abi Zar and completed around 1326. That is roughly four and a half centuries after she supposedly lived. Nothing contemporary to her survives. Some historians accept the account as preserved oral tradition; others treat it more cautiously, and a few doubt she existed at all in the form the story describes.

None of this diminishes the site. The mosque is unquestionably ninth century. The teaching tradition is unquestionably ancient. But the founding story sits in that honest grey area between history and inherited memory, and Fes is full of those. Knowing the difference makes standing there more interesting, not less.

What "Oldest University" Actually Means

You will see Al-Qarawiyyin described as the oldest continuously operating degree-granting institution in the world, a claim that has appeared in the Guinness Book of World Records and in UNESCO material. It is a strong claim, and it comes with a footnote.

For most of its life, Al-Qarawiyyin was not a university in the European sense. It was a mosque where teaching circles formed around individual scholars. A student attached himself to a teacher, worked through a body of texts, and received an ijaza, a licence certifying he could transmit that text to others. The authority sat with the teacher, not with an institution issuing diplomas. That model predates the European university by centuries and does not map neatly onto it.

The formal restructuring came much later. Al-Qarawiyyin was folded into the Moroccan state university system in 1963 and officially renamed the University of Al Quaraouiyine in 1965. Today it teaches Islamic law, theology, and classical Arabic, with faculties spread across several Moroccan cities.

So: oldest continuously operating institution of higher learning, yes. Oldest university in the modern administrative sense, with an asterisk. The continuity is the remarkable part either way. Teaching has happened on that spot, without a break, for more than eleven hundred years.

The Scholars Who Passed Through

Ibn Khaldun, the fourteenth-century historian whose Muqaddimah is still assigned in universities today, is associated with Al-Qarawiyyin as both student and teacher. Al-Idrisi, the geographer who produced one of the most accurate world maps of the medieval period for the Norman court in Sicily, is linked to it. So is Ibn Rushd, known in Europe as Averroes.

The most repeated claim is that Gerbert of Aurillac, who became Pope Sylvester II in 999, studied here and carried Arabic numerals back into Europe. It is a wonderful story and it is told constantly in Fes. It is also unverified. Gerbert certainly studied in Catalonia, where Arabic mathematical texts were circulating, and he certainly played a role in transmitting that knowledge northward. A documented stay in Fes is a different matter and the evidence is not there. Treat it as tradition rather than record.

The Building Itself

What stands today is not what Fatima al-Fihri built. The mosque has been enlarged, rebuilt, and redecorated by nearly every dynasty that has ruled Fes.

The square stone minaret dates to 956, built under Zenata rule and one of the oldest surviving minarets in Morocco. The great expansion came under the Almoravids: the emir Ali ibn Yusuf pushed the qibla wall south between roughly 1134 and 1143, roughly doubling the prayer hall and bringing it close to its present size. That campaign introduced Andalusian ornament directly borrowed from the Great Mosque of Cordoba, including carved plasterwork and muqarnas vaulting, the honeycombed stalactite domes that are among the finest of their kind anywhere.

The Saadians added the two pavilions in the courtyard in the late sixteenth century, modelled on the Court of the Lions at the Alhambra. The prayer hall holds around twenty-two thousand worshippers. The whole complex is built from stuccoed brick, cedar, marble, and zellige, the cut-tile mosaic that Fes still produces by hand a few streets away.

The Library

Attached to the mosque is a library founded in 1359 by the Marinid sultan Abu Inan Faris, the same ruler who commissioned the Bou Inania Madrasa and the Dar al-Magana water clock. It is frequently called the oldest working library in the world.

Its collection runs to several thousand manuscripts. Among them: a ninth-century Quran written on camel skin in Kufic script, a copy of Ibn Khaldun's Muqaddimah from 1396, and manuscripts on medicine, astronomy, jurisprudence, and grammar. Some are held behind a door that historically required four separate keys, kept by four different people, none of whom could open it alone.

By the early 2000s the building was in trouble. Water was seeping into the manuscript rooms, humidity was uncontrolled, and the structure was deteriorating. In 2012 the Moroccan Ministry of Culture commissioned the Fes-born architect Aziza Chaouni to restore it. The work took several years and reopened in 2016. Chaouni's team rebuilt the drainage, installed a humidity control system and solar panels, added a manuscript restoration laboratory, and fitted the rare books room with digital locks.

There is a symmetry there that is hard to ignore. A library at an institution founded, by tradition, by a woman, brought back from the edge of ruin by another woman more than a thousand years later.

Can You Go Inside?

Short answer: the mosque, no. The library, sometimes.

Al-Qarawiyyin is an active place of worship, and like nearly all functioning mosques in Morocco, it is closed to non-Muslims. What you can do is look. The doors are open through the day and the views from the thresholds are genuinely worth the walk. The best is Bab al-Ward, the main gate on the northwest side, which frames the courtyard, the central fountain, and the Saadian pavilions in one clean line. Stand there for a while. You will see students crossing, men arriving for prayer, the light moving across the tile. It is a working building and it looks like one.

The library reopened to the public after the restoration, with an exhibition space and reading rooms. In practice, access for foreign visitors has been inconsistent, and travellers report being turned away as often as let in. Researchers can arrange access by appointment. If seeing the interior matters to you, ask your riad to check on the day rather than arriving with expectations.

Practical info

  • Location: Between Place Seffarine and the Souk al-Attarine, Fes el-Bali

  • Best viewpoint: Bab al-Ward gate for the courtyard view; the rooftop terraces of shops on Place Seffarine for the green roofs and minaret

  • Best time: Mid-morning, when courtyard light is strongest and the medina is awake but not yet crowded

  • Dress: Shoulders and knees covered.

Book Directly & Get the Best Rate

Reserve your suite at Riad Joy Fes through our website and you'll always get our best available rate.

Check Availability & Book Your Stay →

Al-Qarawiyyin is stitched so tightly into the fabric of Fes el-Bali that you can pass three of its fourteen doors without realising what you are walking past. The medina grew around it, then over it. What you get instead of a facade is a series of glimpses: a horseshoe arch framing a courtyard of white and black tile, a green pyramidal roof rising above the rooftops, the sound of recitation carried through a doorway on a street too narrow for two people to pass comfortably.

That is the whole story of this place, really. It was never designed to be looked at. It was designed to be used. And it has been in continuous use since the year 859.

The Woman Behind It (And What We Actually Know)

The traditional account goes like this. Fatima al-Fihri, daughter of a wealthy merchant from Kairouan in what is now Tunisia, came to Fes with her family during the ninth century. When her father and husband died, she inherited a fortune. Rather than keep it, she bought land near the spice market and commissioned a mosque for her community of Kairouanese exiles, naming it al-Qarawiyyin after the city they had left behind. Construction is usually dated to 857 to 859.

Here is the part most articles leave out, and it is worth knowing before you repeat the story at dinner.

The earliest surviving source for Fatima al-Fihri is Rawd al-Qirtas, a chronicle written by Ibn Abi Zar and completed around 1326. That is roughly four and a half centuries after she supposedly lived. Nothing contemporary to her survives. Some historians accept the account as preserved oral tradition; others treat it more cautiously, and a few doubt she existed at all in the form the story describes.

None of this diminishes the site. The mosque is unquestionably ninth century. The teaching tradition is unquestionably ancient. But the founding story sits in that honest grey area between history and inherited memory, and Fes is full of those. Knowing the difference makes standing there more interesting, not less.

What "Oldest University" Actually Means

You will see Al-Qarawiyyin described as the oldest continuously operating degree-granting institution in the world, a claim that has appeared in the Guinness Book of World Records and in UNESCO material. It is a strong claim, and it comes with a footnote.

For most of its life, Al-Qarawiyyin was not a university in the European sense. It was a mosque where teaching circles formed around individual scholars. A student attached himself to a teacher, worked through a body of texts, and received an ijaza, a licence certifying he could transmit that text to others. The authority sat with the teacher, not with an institution issuing diplomas. That model predates the European university by centuries and does not map neatly onto it.

The formal restructuring came much later. Al-Qarawiyyin was folded into the Moroccan state university system in 1963 and officially renamed the University of Al Quaraouiyine in 1965. Today it teaches Islamic law, theology, and classical Arabic, with faculties spread across several Moroccan cities.

So: oldest continuously operating institution of higher learning, yes. Oldest university in the modern administrative sense, with an asterisk. The continuity is the remarkable part either way. Teaching has happened on that spot, without a break, for more than eleven hundred years.

The Scholars Who Passed Through

Ibn Khaldun, the fourteenth-century historian whose Muqaddimah is still assigned in universities today, is associated with Al-Qarawiyyin as both student and teacher. Al-Idrisi, the geographer who produced one of the most accurate world maps of the medieval period for the Norman court in Sicily, is linked to it. So is Ibn Rushd, known in Europe as Averroes.

The most repeated claim is that Gerbert of Aurillac, who became Pope Sylvester II in 999, studied here and carried Arabic numerals back into Europe. It is a wonderful story and it is told constantly in Fes. It is also unverified. Gerbert certainly studied in Catalonia, where Arabic mathematical texts were circulating, and he certainly played a role in transmitting that knowledge northward. A documented stay in Fes is a different matter and the evidence is not there. Treat it as tradition rather than record.

The Building Itself

What stands today is not what Fatima al-Fihri built. The mosque has been enlarged, rebuilt, and redecorated by nearly every dynasty that has ruled Fes.

The square stone minaret dates to 956, built under Zenata rule and one of the oldest surviving minarets in Morocco. The great expansion came under the Almoravids: the emir Ali ibn Yusuf pushed the qibla wall south between roughly 1134 and 1143, roughly doubling the prayer hall and bringing it close to its present size. That campaign introduced Andalusian ornament directly borrowed from the Great Mosque of Cordoba, including carved plasterwork and muqarnas vaulting, the honeycombed stalactite domes that are among the finest of their kind anywhere.

The Saadians added the two pavilions in the courtyard in the late sixteenth century, modelled on the Court of the Lions at the Alhambra. The prayer hall holds around twenty-two thousand worshippers. The whole complex is built from stuccoed brick, cedar, marble, and zellige, the cut-tile mosaic that Fes still produces by hand a few streets away.

The Library

Attached to the mosque is a library founded in 1359 by the Marinid sultan Abu Inan Faris, the same ruler who commissioned the Bou Inania Madrasa and the Dar al-Magana water clock. It is frequently called the oldest working library in the world.

Its collection runs to several thousand manuscripts. Among them: a ninth-century Quran written on camel skin in Kufic script, a copy of Ibn Khaldun's Muqaddimah from 1396, and manuscripts on medicine, astronomy, jurisprudence, and grammar. Some are held behind a door that historically required four separate keys, kept by four different people, none of whom could open it alone.

By the early 2000s the building was in trouble. Water was seeping into the manuscript rooms, humidity was uncontrolled, and the structure was deteriorating. In 2012 the Moroccan Ministry of Culture commissioned the Fes-born architect Aziza Chaouni to restore it. The work took several years and reopened in 2016. Chaouni's team rebuilt the drainage, installed a humidity control system and solar panels, added a manuscript restoration laboratory, and fitted the rare books room with digital locks.

There is a symmetry there that is hard to ignore. A library at an institution founded, by tradition, by a woman, brought back from the edge of ruin by another woman more than a thousand years later.

Can You Go Inside?

Short answer: the mosque, no. The library, sometimes.

Al-Qarawiyyin is an active place of worship, and like nearly all functioning mosques in Morocco, it is closed to non-Muslims. What you can do is look. The doors are open through the day and the views from the thresholds are genuinely worth the walk. The best is Bab al-Ward, the main gate on the northwest side, which frames the courtyard, the central fountain, and the Saadian pavilions in one clean line. Stand there for a while. You will see students crossing, men arriving for prayer, the light moving across the tile. It is a working building and it looks like one.

The library reopened to the public after the restoration, with an exhibition space and reading rooms. In practice, access for foreign visitors has been inconsistent, and travellers report being turned away as often as let in. Researchers can arrange access by appointment. If seeing the interior matters to you, ask your riad to check on the day rather than arriving with expectations.

Practical info

  • Location: Between Place Seffarine and the Souk al-Attarine, Fes el-Bali

  • Best viewpoint: Bab al-Ward gate for the courtyard view; the rooftop terraces of shops on Place Seffarine for the green roofs and minaret

  • Best time: Mid-morning, when courtyard light is strongest and the medina is awake but not yet crowded

  • Dress: Shoulders and knees covered.

Book Directly & Get the Best Rate

Reserve your suite at Riad Joy Fes through our website and you'll always get our best available rate.

Check Availability & Book Your Stay →

© 2026 - Riad Joy - All rights reserved

Made with ❤️ by ngen solutions

Terms and Conditions

Privacy Policy

© 2026 - Riad Joy - All rights reserved

Made with ❤️ by ngen solutions

Terms and Conditions

Privacy Policy

© 2026 - Riad Joy - All rights reserved

Made with ❤️ by ngen solutions

Terms and Conditions

Privacy Policy