<

Centre of Merzouga, N13 Morocco

Follow Us :

|

Top
 

Who Created the First University? Fatima al-Fihri and the Story of Fez University

Over Morocco Tours / Activities And Attractions  / Who Created the First University? Fatima al-Fihri and the Story of Fez University

Who Created the First University? Fatima al-Fihri and the Story of Fez University

The world’s oldest existing, continuously operating degree-granting institution was not founded by a king, a caliph, or a religious council. It was established in 859 CE by a woman, Fatima al-Fihri, whose merchant father had left her a sizable inheritance. She used it all to construct a mosque in Fez, Morocco, which over centuries evolved into what is now regarded as the world’s first university. This guide explains that fact in full: who Fatima al-Fihri was, how the institution now known as Fez University, properly called the University of al-Qarawiyyin, came into existence, why historians and organizations such as UNESCO and Guinness World Records credit it as the oldest university on the planet, and what’s fact versus popular exaggeration in the story that has grown up around Fatima alfihri over the past century of renewed interest in her legacy.


Quick Answer: Who Created the First university of al-qarawiyyin?

  • Founder: Fatima al-Fihri, a wealthy Tunisian-born merchant’s daughter living in Fez, Morocco
  • Founded: 859 CE, as the Al-Qarawiyyin Mosque, later developing into a full university
  • Location: Fez, Morocco, inside what is now the historic Fes el Bali medina
  • Recognition: Widely recognized, including by UNESCO and Guinness World Records, as the oldest existing, continually operating degree-granting educational institution in the world
  • Funding: Built entirely using Fatima al-Fihri’s personal inheritance from her father, a successful merchant
  • Still active today: Yes, Al-Qarawiyyin functions as both a mosque and a public university, now part of Morocco’s modern state university system

Who Was Fatima al-Fihri?

Fatima al-Fihri was born in the early 9th century into a wealthy merchant family in Kairouan, in what is now Tunisia. Her father, Mohammed al-Fihri, had made a substantial fortune through trade, and at some point during her early years, the family moved to Fez, in what was then the fledgling Idrisid kingdom of Morocco, joining a wave of migration from Kairouan that brought skilled craftspeople, scholars, and traders into the city. The name of this community, and the neighborhood in which they settled, is how Fez’s Kairouan-descended quarter earned its name, a name still used for part of the old medina today.

Fatima had a sister, Mariam al-Fihri, and the two women inherited a large fortune when their father died. Rather than simply live off that inheritance, both sisters chose to funnel it into major public works for their adopted city. Mariam funded the construction of the Andalusiyyin Mosque, which was built for the Andalusian immigrants from the Iberian Peninsula who settled in Fez. Meanwhile, Fatima embarked on an even more ambitious project: a mosque for the Kairouan-descended community, on a scale and with an educational purpose that would one day make her name known throughout the world, more than a thousand years later, as the founder of the world’s oldest university.

Outside of these basic facts, little has been written about Fatima al-Fihri’s personal life: there is no detailed contemporary biography of the woman as there might have been for a political or religious leader of the same time period. What is well documented is the act of founding itself and its lasting institutional consequences, which is ultimately what secured her place in history, through later historical chronicles including the work of the 17th-century Moroccan historian Ibn Abi Zar and the writings of the Algerian scholar Ahmad al-Buji.


Fez in the 9th Century: The City Fatima al-Fihri Helped Shape

To understand why Fatima al-Fihri’s project succeeded where a similar enterprise might have dissolved into obscurity elsewhere, it helps to understand the city she was building it in. Idris I founded Fez just a few decades earlier, around 789 CE, and his son Idris II greatly expanded it. It was the capital of the newly founded Idrisid dynasty, the first independent Islamic state in Morocco, founded outside the direct control of the Abbasid Caliphate further east. In fact, when Fatima al-Fihri and her family arrived, the city was a burgeoning capital still undergoing the process of defining itself.

Timing was everything. By the mid-9th century, Fez was simultaneously taking in migration from both directions: Andalusian refugees from the Iberian Peninsula to the north and families from Kairouan, like Fatima al-Fihri’s, from what is now Tunisia to the east. Idris II is actively encouraged in this settlement, giving each community its own quarter in the growing city. Fatima al-Fihri commissioned the Al-Qarawiyyin Mosque as a conscious act to respond to the spiritual and educational needs of the Kairouan community, endowing it from the very beginning with a specific communal purpose rather than that of an abstract civic monument.

And this context helps to explain the longevity of the institution, too. A mosque constructed to anchor a particular community’s identity, in a burgeoning capital city under a dynasty that was actively investing in the city’s development, had a far stronger basis for long-term survival than an institution constructed in isolation. The ruling dynasties that succeeded the Idrisids, precisely because it had become so deeply interwoven with the civic and religious life of the city, continued to find value in the maintenance and expansion of Al-Qarawiyyin, a pattern of continuous investment that, over eleven centuries, goes a long way to explaining why the institution never suffered the kind of prolonged closure or abandonment that put an end to the continuous operation of many other early centers of learning.


The Founding of university of al-qarawiyyin: 859 CE

In 859 CE, Fatima al-Fihri commissioned the construction of a mosque in Fez, using her inheritance to fund the entire project outright rather than relying on royal or communal patronage. According to the historical accounts that have come down through the centuries, she vowed to spend her whole fortune on the mosque’s construction and reportedly fasted throughout the building process as a devotional gesture tied to the project’s completion. The mosque was named Al-Qarawiyyin, after the Kairouan community it was built to serve.

From the outset, the mosque wasn’t designed purely as a place of prayer. Like many major mosques of the early Islamic world, it functioned simultaneously as a center of learning, where scholars taught religious law, grammar, and eventually a much broader curriculum to students who gathered in its prayer hall and surrounding rooms. Over the following centuries, under the patronage of successive dynasties that ruled Morocco the Idrisids, the Almoravids, the Almohads, the Marinids, and later rulers the institution expanded steadily in both physical size and academic scope, gradually acquiring the structured curriculum, formal instruction, and degree-granting authority that define a university in the modern sense.

This gradual evolution is important to understanding the “first university” claim properly. Al-Qarawiyyin wasn’t founded in 859 as a university in the way we’d recognize one today; it began as a mosque with the attached function of religious and scholarly teaching, and its transformation into a formally structured, degree-awarding institution happened over the following centuries, particularly under the Marinid dynasty in the 13th and 14th centuries, when the complex was significantly expanded and its educational role formalized. What makes the 859 founding date so significant isn’t that a fully modern university sprang into existence overnight, but that this is the moment the institution’s unbroken, continuous history begins a thread of continuous operation that, remarkably, has never been severed in more than eleven centuries since.


Why Al-Qarawiyyin Is Recognized as the First University in the World

The claim that Al-Qarawiyyin is the world’s oldest university rests on a specific and fairly precise distinction, and it’s worth being clear about exactly what that distinction is, since it’s often stated imprecisely.

Oldest “Existing” and “Continually Operating”

Guinness World Records officially recognizes Al-Qarawiyyin as the oldest existing, continually operating educational institution in the world that grants degrees. Both qualifiers matter here. “Existing” excludes ancient centers of learning that no longer function, such as those of classical antiquity. ” Continually operating” excludes institutions that were founded earlier but experienced long closures, refoundations, or breaks in their institutional continuity. Al-Qarawiyyin has, remarkably, never stopped functioning as a center of learning since its 9th-century founding.

Older Than Bologna, Oxford, and the Rest of Europe’s Historic Universities

The University of Bologna, often cited in European contexts as the oldest university in the Western world, was founded in 1088, more than two centuries after Al-Qarawiyyin. Oxford’s teaching traditions date to around 1096, and most of the other historic universities commonly listed among the world’s oldest, including Paris, Cambridge, and Padua, were all founded even later, well into the 12th and 13th centuries. This chronological gap is the core of why Al-Qarawiyyin’s founding matters so much to the global history of higher education, not just the regional history of Morocco.

Formal Recognition by UNESCO and International Bodies

UNESCO has recognized the historical significance of Al-Qarawiyyin both directly and as part of the larger UNESCO World Heritage listing of the Fes medina, of which the mosque-university complex is a core component. This recognition and Guinness World Record entry have over the last several decades helped to strengthen Al-Qarawiyyin’s position in international reference works and educational histories, tackling what was for a long time a Eurocentric framework of “the first university,” which completely disregarded institutions outside of Europe.


What Was Taught at Fez University, and Who Studied There?

Over its long history, Al-Qarawiyyin’s curriculum expanded well beyond religious instruction alone. Subjects taught across different periods included Islamic jurisprudence and theology, Arabic grammar and rhetoric, logic, mathematics, astronomy, medicine, chemistry, and geography a breadth that reflects the wider flourishing of scholarship across the medieval Islamic world, of which Al-Qarawiyyin was one of the most important centers, alongside institutions like Al-Azhar in Cairo, founded roughly a century later.

Several figures associated with university of al-qarawiyyin, whether as students, teachers, or visiting scholars, went on to significant historical prominence.

  • Ibn Khaldun: The influential 14th-century historian and sociologist, widely regarded as a founding figure in the study of historiography and sociology, is associated with Al-Qarawiyyin during his time in Fez.
  • Maimonides: The renowned Jewish philosopher and physician is generally understood to have spent time studying in Fez during his family’s period there, in a city that hosted both the university and a significant Jewish community.
  • Leo Africanus: The celebrated geographer and diplomat, whose later writings introduced much of Africa to European readers, studied at Al-Qarawiyyin before his travels.
  • Ibn al-Arabi: The influential Andalusian mystic and philosopher is associated with the broader intellectual circles connected to Al-Qarawiyyin and Fez’s scholarly community.

One claim that circulates widely but deserves a note of caution is the popular story that Gerbert of Aurillac, who later became Pope Sylvester II and is credited with helping introduce Arabic numerals to medieval Europe, studied at Al-Qarawiyyin. This tale is a frequently repeated and appealing story, but it isn’t solidly documented by contemporary historical sources, and serious historians generally treat it as unverified popular tradition rather than an established fact. It’s worth knowing that the claim exists and understanding why it’s so often repeated, while also being honest that it doesn’t rest on the same footing as the better-documented figures above.


The Architecture of the Mosque-University Complex

Al-Qarawiyyin’s physical structure has grown substantially since Fatima al-Fihri’s original 9th-century construction, shaped by successive dynasties who each left their own architectural mark on the complex. The Almoravids expanded the mosque significantly in the 12th century, and the Marinid dynasty added much of the decorative detail carved cedar woodwork, intricate zellige tilework, and calligraphic inscriptions that gives the complex its rich, layered visual character today, reflecting several centuries of Moroccan architectural styles in a single building.

The prayer hall itself is vast, one of the largest in North Africa, capable of holding thousands of worshippers, and the complex historically included a library that has become one of its most celebrated features. The Al-Qarawiyyin Library, believed to be among the oldest libraries in the world still in operation, holds a substantial collection of rare manuscripts spanning Islamic law, theology, science, and history, some dating back centuries. In 2016, the library underwent a major restoration led by Moroccan-Canadian architect Aziza Chaouni and reopened to the public in 2017 for the first time in its history, allowing non-scholars to view parts of the collection and the historic reading rooms that had previously been accessible only to a small circle of researchers.


Fatima al-Fihri’s Legacy Today

Interest in Fatima al-Fihri’s story has grown considerably in recent decades, partly driven by renewed international scholarship correcting long-standing gaps in the global history of higher education and partly by a broader movement to recognize the historical contributions of women to fields like education that have often been told through a male-centered lens. Her story is increasingly cited in discussions of women’s history, the history of philanthropy, and the history of education worldwide, not just within Moroccan or Islamic historical scholarship specifically.

Today, Al-Qarawiyyin operates as a public university within Morocco’s modern state education system, having been formally integrated into the national university structure in the 1960s following Morocco’s independence. It continues to grant degrees, primarily in Islamic studies and related fields, while also functioning as an active mosque for worship and formal higher education, continuing to coexist within the same complex, much as they did at its founding more than eleven centuries ago.

Fatima al-Fihri’s name has also become attached to various honors and initiatives well beyond Morocco, cited in discussions ranging from the history of philanthropy to modern efforts promoting women’s access to education. Her story a woman using an inherited fortune not for personal comfort but to build an institution that has now educated students for well over a millennium has proven to be one of history’s more quietly remarkable acts of long-term civic investment.


Common Misconceptions About Fatima al-Fihri and Al-Qarawiyyin

Misconception: Al-Qarawiyyin Was Founded as a Fully Formed University in 859

As covered above, the institution began as a mosque with an attached teaching function, and its transformation into a structured, degree-granting university happened gradually over the following centuries. The 859 date marks the beginning of its continuous institutional history, not the moment a complete university curriculum and structure sprang into existence.

Misconception: It’s the Oldest Center of Learning in Human History, Full Stop

Al-Qarawiyyin claims to be the oldest existing and continuously functioning degree-granting institution, a very specific category. Naturally, there were earlier centers of learning in antiquity, such as those in ancient Greece, Egypt, and elsewhere, but none of these are still in operation today, in continuous operation, which is precisely the distinction that separates Al-Qarawiyyin.

Misconception: Fatima al-Fihri Was a Scholar or Teacher Herself

Historical accounts identify her as the founder and funder of the institution, not a teacher or scholar working in it. Her contribution was one of vision and philanthropy in commissioning, funding and overseeing the construction of the mosque, rather than direct involvement in its early teaching activities, which followed under later scholars once the institution was established.

Misconception: Every Famous Name Associated with Al-Qarawiyyin Is Equally Well Documented

As noted above with the Gerbert of Aurillac claim, not every widely repeated connection to Al-Qarawiyyin rests on the same level of historical evidence. Some links, like Ibn Khaldun’s, are well established in the historical record; others are popular traditions that should be treated with appropriate caution rather than repeated as settled facts.


Visiting Al-Qarawiyyin in Fez Today

Al-Qarawiyyin remains an active mosque, which means the prayer hall itself is not open to non-Muslim visitors, in line with the general practice at most working mosques across Morocco. That said, travelers can still experience a meaningful part of this history in person. The exterior courtyards and some outer sections.

parts of the complex can be viewed from the surrounding medina streets, offering a glimpse of the intricate tilework and carved details that make the building one of Fez’s architectural highlights.

The bigger opportunity for visitors came with the 2017 reopening of the Al-Qarawiyyin Library, which, following its careful restoration, now welcomes visitors to view parts of its historic collection and reading rooms, a rare chance to step inside a working piece of this eleven-century-old institution rather than only viewing it from outside the walls. Advance planning is worth doing, since access and opening arrangements can change, and a knowledgeable local guide familiar with Fez el Bali’s medina can make it far easier to actually locate the entrance among the medina’s dense, winding lanes.

Beyond Al-Qarawiyyin itself, the wider Fes el Bali medina in which it sits is worth a proper visit in its own right. The Chouara Tanneries, the Al-Attarine and Bou Inania Madrasas, and the medina’s UNESCO-listed maze of over 9,000 lanes together make Fez one of Morocco’s most historically dense cities. For a full picture of what else the city offers, see our guide to the cities of Morocco, which covers Fez alongside the country’s other major destinations.


Practical Tips for Seeing This Piece of History in Fez

  • Hire a local guide for Fes el Bali: The medina’s layout is genuinely disorienting even for experienced travelers, and Al-Qarawiyyin’s entrances aren’t obvious from the street without local knowledge.
  • Check current library access before you go: Visiting arrangements for the restored library have changed since its 2017 reopening, so confirming current access is worth doing shortly before your trip.
  • Dress modestly: As with any mosque exterior or religious site in Morocco, modest dress is appreciated even when only viewing from outside.
  • Pair the visit with the wider medina: Al-Qarawiyyin sits close to other major Fez sights, making it easy to combine into a single half-day medina walk.
  • Plan your Fez stop within a wider Morocco itinerary: See our guide on what to do in Morocco and where to go for how Fez fits alongside Marrakech, the Atlas Mountains, and the Sahara.

Frequently Asked Questions About Fatima al-Fihri and Fez University

Who created the first university in the world?

Fatima al-Fihri, a merchant’s daughter living in Fez, Morocco, founded the Al-Qarawiyyin Mosque in 859 CE, which developed over the following centuries into what is now recognized as the world’s oldest existing, continually operating degree-granting university.

Where was Fatima al-Fihri from?

Fatima al-Fihri was born in Kairouan, in present-day Tunisia, and later moved with her family to Fez, Morocco, where she founded Al-Qarawiyyin.

Is Al-Qarawiyyin really older than the University of Bologna?

Yes, Al-Qarawiyyin was founded in 859 CE, more than two centuries before the University of Bologna, which was founded in 1088 and is often cited as the oldest university in the Western world.

Can tourists visit Al-Qarawiyyin in Fez?

The mosque’s prayer hall is reserved for Muslim worshippers, as with most active mosques in Morocco, but the exterior courtyards can be viewed from the medina, and the restored Al-Qarawiyyin Library has welcomed public visitors since its 2017 reopening.

Did Fatima al-Fihri teach at the university she founded?

Historical records credit her as the founder and funder of the institution rather than as a teacher within it; formal instruction developed under scholars in the centuries following its founding.

What subjects were taught at Al-Qarawiyyin historically?

Over its history, the curriculum expanded to include Islamic jurisprudence, theology, Arabic grammar, logic, mathematics, astronomy, medicine, chemistry, and geography, reflecting the broader intellectual life of the medieval Islamic world.

Is Al-Qarawiyyin still a functioning university today?

Yes, it operates as a public university within Morocco’s state education system, primarily focused on Islamic studies, while also continuing to function as an active mosque.

Did Fatima al-Fihri have a sister who also founded a mosque?

Yes, her sister, Mariam al-Fihri, funded the construction of the Andalusiyyin Mosque in Fez, built to serve the city’s community of Andalusian migrants.


Related Guides


See the World’s Oldest University in Person

Fez is one of Morocco’s most historically rich cities, and Al-Qarawiyyin is only one part of what makes its medina worth exploring properly with a knowledgeable local guide.

Browse our Fez city tours and imperial city itineraries, or ask us to build Fez into a wider Morocco trip.

Browse Fez Tours

 

Leave a Reply: