Aathaar · Fatima al-Fihriyah

The inheritance and the university

Who was The inheritance and the university? Fatima al-Fihriyah inherited a fortune in Fez in 859 CE. Her sister Maryam did too. Both women vowed to spend their whole inheritance on public foundations. Fatima's foundation, al-Qarawiyyin, has been operating as a university continuously ever since. 1,167 years and counting.

AsrNaam Editorial · From the classical sources

Fatima al-Fihriyah inherited a fortune in Fez in 859 CE. Her sister Maryam did too. Both women vowed to spend their whole inheritance on public foundations. Fatima's foundation, al-Qarawiyyin, has been operating as a university continuously ever since. 1,167 years and counting.

Fatima bint Muhammad al-Fihri was born in Kairouan, in what is now Tunisia, about 800 CE. Her family were prosperous merchants of the Bani Fihr, a Qurayshi lineage that traced descent to Mecca. When Fez was founded by Idris II in 808 CE as the new capital of the Idrisid kingdom of Morocco, a wave of migrants from Kairouan crossed the Maghreb to settle there. Fatima's family was among them. They arrived in the 820s, when Fatima was a young woman.

Her father, Muhammad al-Fihri, became one of the wealthiest merchants of Fez. He built up a large trading house in the Andalusian Quarter of the new city, one of the two founding quarters (the other being the Kairouanese Quarter, where his family's countrymen settled). His two daughters, Fatima and Maryam, grew up learning to read and write Arabic in a home where the family's mercantile business gave them daily exposure to accounts, contracts, and the workings of money.

Their father died in the late 850s. Their mother had died some years earlier. The two daughters inherited the whole family fortune. Their brother, who might have inherited under some circumstances, had died young. The classical sources are specific on this point: the inheritance came to Fatima and Maryam absolutely, under Maliki inheritance law, and they had full discretion over what to do with it.

They made the same decision independently. Both vowed to spend their whole inheritance on a public foundation for the Muslim community of Fez. Maryam's foundation was a mosque and school in the Andalusian Quarter, called the Andalusian Mosque. It is still standing today. Fatima's foundation, in the Kairouanese Quarter, was the mosque and teaching institution she called al-Qarawiyyin, "the Kairouan Mosque", after the city of her family's origin.

She began construction in Ramadan 245 AH (November-December 859 CE). She oversaw the building personally. The classical sources report she fasted every day of the construction, the entire building project of the mosque and its madrasa, as an act of consecration.

Al-Qarawiyyin opened in the following year. It began as a mosque with an attached teaching circle. The teaching quickly grew. The mosque became a madrasa. The madrasa acquired a library, faculty of law, faculty of theology, and, by the late ninth century, faculties of mathematics, astronomy, and medicine.

Al-Qarawiyyin is listed by UNESCO and by the Guinness Book of Records as the oldest continuously-operating degree-granting institution of higher education in the world. It has been open continuously since 859 CE. That is 1,167 years as of 2026. The University of Bologna (founded 1088) is 229 years younger. The University of Oxford (founded around 1096) is 237 years younger. Al-Azhar in Cairo (founded 970 CE by the Fatimids) is 111 years younger.

Al-Qarawiyyin's alumni across a millennium include Ibn Khaldun (father of sociology, historian of the Berber peoples, whose Muqaddima is one of the founding works of the philosophy of history); Ibn al-Arabi al-Ma'afiri (the great Andalusi jurist and historian); Leo Africanus (the Muslim geographer whose account of Africa was translated into Latin and shaped European knowledge of the continent for centuries); Maimonides (the great Jewish philosopher, who studied there before writing the Mishneh Torah); and Pope Sylvester II (Gerbert of Aurillac, who introduced Arabic numerals and the astrolabe to Christian Europe after studying at al-Qarawiyyin).

Fatima al-Fihriyah herself is barely mentioned in the classical Muslim sources of the following centuries. She was a founder-benefactor. She was not a public figure. She did not teach at al-Qarawiyyin. She did not write. She left no diaries, no letters, no known portraits. What she left was the endowment.

The endowment operated as a waqf, a perpetual charitable trust under Islamic law. The waqf structure was extraordinarily stable across a millennium. Even when the political rulers of Fez changed, Idrisids, Almoravids, Almohads, Marinids, Wattasids, Saadids, Alawis, the al-Qarawiyyin waqf continued to fund the university's operations. When the French colonised Morocco in 1912, they preserved al-Qarawiyyin as a Muslim religious institution. When Morocco gained independence in 1956, King Mohammed V modernised al-Qarawiyyin's curriculum but preserved its status as the oldest continuously operating university in the world.

Al-Qarawiyyin admitted its first female students in 1940. In 2015 UNESCO restored its historic library, the oldest working library in the world, which contains manuscripts from the ninth century onward, including Ibn Rushd's autograph copies of his commentaries on Aristotle. The library is still open. Scholars still consult its manuscripts.

Fatima al-Fihriyah died about 880 CE. She was buried in Fez. Her tomb is a small unassuming site next to the mosque she founded, largely unmarked. Every visitor to Fez walks past it without knowing.

What the story teaches

Fatima al-Fihriyah's foundation is remembered by Muslims for a specific structural reason. She could have kept the money. She could have married into another wealthy family and consolidated the estates. She could have built a private palace. Instead she committed the entire inheritance to a public institution and structured it as a waqf that would outlast her by many centuries. The classical Muslim understanding of the waqf is that it is one of the three deeds the Prophet ﷺ named that continue to accrue reward to a deceased Muslim: a running charity, useful knowledge left behind, or a righteous child who prays for them. Fatima's al-Qarawiyzin has counted, by that logic, for eleven centuries of running charity plus eleven centuries of useful knowledge left behind, a double reward across every scholar who has passed through its doors. She is one of the great examples in Islamic history of what a Muslim woman with capital can do when she is left the freedom to decide what her wealth is for. She decided it was for the ummah, in perpetuity, for as long as Muslims would need to learn. Her decision has held for 1,167 years. It is still holding. It is arguably the most durable single act of philanthropy in human history.