Heritage · University
University of al-Qarawiyyin: History and Overview
Founded between 857 and 859 AD by Fatima al-Fihri, a merchant's daughter who spent her inheritance on a mosque with a place of learning attached, the University of al-Qarawiyyin in Fez is recognised by UNESCO and Guinness World Records as the oldest existing, continually operating higher-education institution in the world. Its library keeps ninth-century Qurans and the manuscript of Ibn Khaldun's Muqaddimah.Written to last.
By Confinity Heritage Editorial · 2026-08-24 · 8-minute readQuiet tools, kept out of the way.

The University of al-Qarawiyyin stands in the heart of the old medina of Fez, in Morocco, where it has taught without interruption since the middle of the ninth century. Both UNESCO and Guinness World Records recognise it as the oldest existing, continually operating higher-education institution in the world. It was founded by a woman. Fatima al-Fihri, the daughter of a wealthy merchant, spent her inheritance building a mosque with a place of learning attached, and the institution she endowed between 857 and 859 AD has outlasted every dynasty that ruled the city around it.
Those two facts are worth stating plainly, because each is often treated as a surprise. The world's oldest university is not in Bologna or Oxford but in North Africa, and it exists because a young woman in the ninth century decided that her fortune should become a school. Everything else about al-Qarawiyyin, its manuscripts, its teaching circles, its green-tiled roofs, rests on that founding act.
Fatima al-Fihri's family had migrated to Fez from Kairouan, in present-day Tunisia, part of a community of settlers whose quarter of the city took the name al-Qarawiyyin, "the people of Kairouan." When her father died, Fatima and her sister Mariam each inherited a substantial fortune, and each chose to build a mosque. Mariam's endowment became the al-Andalus mosque across the river; Fatima's became al-Qarawiyyin, founded between 857 and 859. Tradition holds that she oversaw the construction herself and fasted daily until the work was complete.
From early in its life the mosque was also a school. Teaching in the Islamic world of the period was organised around the mosque rather than apart from it, and al-Qarawiyyin drew teachers of Quranic interpretation, law, grammar, medicine, mathematics and astronomy. Its reputation grew with the city. Fez became one of the great intellectual centres of the western Islamic world, and the mosque at its heart became the place where that learning was transmitted, generation after generation, without a break.
Successive dynasties enlarged what Fatima had begun. The Almoravids carried out a major expansion in the twelfth century, and the Marinids, who made Fez their capital, endowed the surrounding quarter with student residences and gave the complex much of its decorative character in the thirteenth and fourteenth centuries. After Morocco regained independence, the institution was incorporated into the state university system in 1963, joining a modern degree structure to a teaching tradition then already eleven centuries old.
Al-Qarawiyyin is not a campus in the European sense. It is a mosque-university woven into the fabric of the Fez medina, a UNESCO World Heritage city whose walled core is among the best preserved medieval townscapes anywhere. The complex announces itself from above: its green-tiled roofs and minaret anchor the skyline of the old city, and from the surrounding rooftops they mark the centre around which the medina's thousands of alleys are wound. At street level the university is glimpsed rather than surveyed, through carved cedar doorways that open onto a marble courtyard with fountains, framed by arcades of horseshoe arches and walls of carved plaster and zellij tilework.
Teaching historically took place in the prayer hall itself. A master sat against a pillar and students gathered around him in a circle called a halqa, each pillar in effect a lecture hall, each circle a course. A student might move from circle to circle over many years, reading texts aloud with a master until judged to have understood them. There were no semesters and no single curriculum; there was the text, the teacher, and the time it took.
The modern university continues the old specialisms in contemporary form. As part of Morocco's state system it grants degrees in Islamic studies, Maliki law, classical Arabic and related fields, with faculties in Fez and other cities, and its scholars remain a reference point for religious learning across the region. Women, whose money built the place, now study and teach there.
What al-Qarawiyyin preserved for more than 1,150 years is not just a building but a method: the idea that knowledge should pass from hand to hand in a chain that can be checked. When a student had mastered a text in the halqa, the teacher granted an ijazah, a personal license certifying that the student had read that work with that master and was authorised to teach it in turn. Each ijazah named the chain of teachers through which the text had come, link by link, sometimes reaching back to the author himself. It was a diploma, but it was also a chain of custody for knowledge, and al-Qarawiyyin has been forging links in such chains since the ninth century.
The physical counterpart of that chain is the library, among the oldest in the world still in use. Its holdings include Qurans from the era of the foundation, written on parchment in the ninth century, and a manuscript of the Muqaddimah of Ibn Khaldun, the fourteenth-century work that laid foundations for the modern study of history and society, kept in the city where its author once taught. For long stretches of the twentieth century the collection was closed away and endangered, with rare volumes suffering from humidity and neglect.
Its rescue came with a fitting symmetry. In 2012 Morocco's culture ministry asked Aziza Chaouni, an architect born in Fez, to lead the restoration. Over four years her team repaired the structure, installed climate control and a conservation laboratory for the fragile manuscripts, and in 2016 the library was partially opened to the public for the first time in its history. A woman founded the institution in the ninth century; eleven and a half centuries later, a woman from the same city restored its library.
The roll of names associated with al-Qarawiyyin traces the reach of medieval Fez. Ibn Khaldun, the historian and social theorist, taught there in the fourteenth century. The geographer al-Idrisi, whose world map served European courts for centuries, studied in Fez, and the Sufi philosopher Ibn al-Arabi and the jurist Ibn Rushayd passed through its circles. Tradition associates Maimonides, the great Jewish philosopher and physician, with the school during his family's years in Fez in the 1160s, though the record of his formal study there is not certain and the association is carried by tradition rather than documents.
The most striking claim is also the most contested. A long tradition holds that Gerbert of Aurillac, the French monk who became Pope Sylvester II in 999, studied in the Islamic schools of the region and encountered there the Arabic numerals he later championed in Europe. His time at al-Qarawiyyin itself is a matter of tradition rather than established record, but the story points at something true: the school stood on one of the routes by which mathematics, astronomy and medicine moved from the Islamic world into Europe. In this it belongs to a wider family of African and Islamic centres of learning, alongside the University of Sankore in Timbuktu and Al-Azhar University in Cairo, founded more than a century after Fatima al-Fihri's school.
The university today operates within Morocco's public system while keeping its distinct identity as the country's seat of traditional religious scholarship. Students pursue degrees in Islamic law, theology and Arabic; the ulama trained there staff courts, mosques and schools across Morocco and beyond, and the institution advises on religious questions at the national level. The mosque remains a working congregational mosque, among the largest in North Africa, with the teaching circles of the old tradition still held alongside the modern faculties.
The restored library has made the institution newly visible to the wider world. Coverage of Chaouni's project introduced international audiences to a collection few had been able to see, and the reading room now serves researchers while a public gallery displays selected treasures. The building that Fatima al-Fihri endowed has entered its thirteenth century of continuous use.
Al-Qarawiyyin stands in the middle of the Fez el-Bali medina, reachable only on foot through the old city's lanes. As a working mosque, its prayer halls are open to Muslims only, but the doorways facing the surrounding streets offer clear views into the courtyard, and the rooftop terraces of nearby buildings look across the green roofs of the complex. The restored library admits visitors to its public sections, and the neighbouring Marinid-era madrasas, especially the Attarine and Bou Inania, are open to all and give a full sense of the architecture in which al-Qarawiyyin's students lived and studied. The medina itself, inscribed by UNESCO in 1981, rewards unhurried walking; the university is its oldest living institution, not a monument apart from the city but the reason much of the city exists.