Eleven centuries before anyone debated who invented the university, one had already been built — in Fez, by a woman, from her own inheritance. It never closed.
The university in images
The founding
In 859, Fatima al-Fihri — a wealthy, devout, and learned woman of Fez — spent her entire inheritance on a mosque with a place of learning attached: the Qarawiyyin, named for the people of Kairouan, the Tunisian city her merchant family had left for Fez. What began as teaching circles around a courtyard became, by every meaningful measure, a university — and it never stopped. Guinness World Records and UNESCO recognize it as the oldest existing, continually operating higher-education institution on earth: eleven and a half centuries of unbroken teaching, in a single Moroccan city.
The details read like a founding myth that happens to be true. Fatima and her sister Maryam were among the richest women of the young city; where Maryam built the Andalusian Mosque, Fatima built the Qarawiyyin. The chronicles say she fasted until the building was complete — piety as project management. Her endowment, a waqf, made the institution financially independent: the world’s first university was a woman’s charitable trust, and it was Moroccan.
The golden age
The formula was the mosque-university: teaching circles in law, theology, grammar, rhetoric, logic, medicine, astronomy, and mathematics, with scholars paid from the endowment’s revenues. Students earned the ijaza — a license to teach a text, the ancestor of the diploma. Fez sat on the routes of gold and of scholars between sub-Saharan Africa and the Mediterranean, and the Qarawiyyin drew students from across the Islamic world and beyond. Its library — among the oldest on earth — still keeps manuscripts a thousand years old, including a Quran of the ninth century on camel skin.
The roll of names reads like a syllabus of civilization. Ibn Khaldun, the father of sociology and historiography, is counted among its scholars; Maimonides, the great Jewish philosopher, studied in Fez; Leo Africanus, whose Description of Africa shaped Europe’s image of the continent, learned there too. For centuries, if you wanted the best education west of Baghdad, you went to Fez — to a city that had quietly made itself the capital of the learned world.
The legacy
The deeper legacy is institutional. The Qarawiyyin’s DNA — endowed colleges, salaried professors, structured curricula, the license to teach — traveled north with scholars and returning students. When Bologna opened in 1088, and Paris and Oxford followed, they were not inventing the university; they were translating it. The gown, the lecture, the degree: the forms of higher education on every continent descend, in part, from a mosque courtyard in Fez.
And it never closed. Through dynasties, colonizations, and reforms, the Qarawiyyin taught without interruption — today part of Morocco’s state university system, its mosque still full, its ancient library restored in 2016. Eleven centuries after a woman spent her fortune on books and teachers, the city that gave the world the university still keeps the lamps lit. Few foundations in history can say as much.