Last verified: 3 December 2026. Method: the UNESCO World Heritage Centre listing for the Medina of Fez, the Encyclopaedia Britannica entry on Qarawiyyin, the Museum With No Frontiers record for the Qarawiyyin Mosque, and the scholarly history of the mosque and university summarised in the Sources were checked for this article on 3 December 2026. Where sources differ — above all on the foundation story and on the “oldest university” claim — this article says so, rather than choosing the tidier version. Access rules for the mosque and the library are not published on one official visitor page; the position stated here is the one reported by visitor guides in 2026 and must be confirmed locally.
Al-Qarawiyyin is not one thing, and that is the first difficulty in writing about it. It is a working mosque in the middle of Fes el-Bali, a library with manuscripts a thousand years old, and a university whose modern form dates from 1963. Visitors who arrive expecting a single monument with a ticket desk and a facade will not find one. The building is pressed on every side by houses, shops and lanes, and most of what matters about al-Qarawiyyin happens behind doors that do not open to everyone.
That is also why al-Qarawiyyin matters beyond Fes. Few buildings in Morocco carry so many centuries in one footprint: a ninth-century foundation, a tenth-century minaret, a twelfth-century prayer hall, fourteenth-century madrasas clustered around it, a library founded in 1349, and a twentieth-century reorganisation into a state university. This guide follows the History & Heritage pattern of our guides to Volubilis and to Bahia Palace in Marrakech: a short history first, then what can actually be seen, then the library, the scholars and the teaching, and finally how to visit respectfully. It keeps the foundation story and the “oldest university” claim in the careful form the evidence allows, because both are more interesting — and more honest — with their complications left in.
Al-Qarawiyyin at a glance
| Item | What to know |
|---|---|
| What it is | A mosque, library and university complex in Fes el-Bali, at the heart of the Medina of Fez |
| Traditional foundation | 857–859, as a mosque founded by Fatima al-Fihri; a rediscovered foundation inscription names Dawud ibn Idris and dates the mosque to 877 — see the history section for why both dates are given |
| Name | Al-Qarawiyyin means, in effect, “of the people of Kairouan”: Fatima al-Fihri’s family had come from Kairouan in present-day Tunisia, and the mosque took its name from that community in Fes |
| Present size | About half a hectare; a large hypostyle prayer hall, a rectangular courtyard with fountains, a square minaret, and annexes including the library |
| Capacity reported | Room for about 22,000 worshippers in the prayer hall and courtyard, as reported in the architectural records summarised in Sources |
| Minaret | Square tower, built in 956, nearly 27 metres high; the earliest surviving minaret in Morocco, on the evidence of the foundation study cited in Sources |
| Library | Founded by the Marinid sultan Abu Inan Faris in 1349; about 4,000 manuscripts today, including a ninth-century Quran on parchment and the author’s own copy of Ibn Khaldun’s Al-‘Ibar, gifted in 1396 |
| Modern university | Incorporated into Morocco’s state university system in 1963 and renamed University of Al Quaraouiyine in 1965; teaching in the old mosque ceased and a new campus was established |
| Heritage status | Al-Qarawiyyin stands inside the Medina of Fez, inscribed on the UNESCO World Heritage List in 1981. The mosque and university are not a separately inscribed World Heritage property |
| Visiting rule that matters most | The mosque interior is for Muslim worshippers. Non-Muslim visitors do not enter the prayer hall. The courtyard can be glimpsed through open doorways, and the library entrance on Place Seffarine has its own, separate arrangements — confirm them locally before you go |
| Cost of looking from outside | None. There is no ticket for viewing the exterior, the doorways and Place Seffarine |
| Time needed | 30 to 60 minutes to walk the lanes around al-Qarawiyyin, look through the doorways and stand on Place Seffarine, longer if you add the neighbouring madrasas |
The spelling needs a word before the history begins. You will meet al-Qarawiyyin, Al Quaraouiyine, Al-Karaouine and Kairaouine for the same place. The differences come from the Arabic letter qaf, which has no exact equivalent in European languages, and from French spelling habits under the Protectorate. This guide uses al-Qarawiyyin throughout, except in quoted titles and in the university’s official modern name, University of Al Quaraouiyine.
A short history of al-Qarawiyyin
The foundation story of al-Qarawiyyin, and the inscription that complicates it
In the ninth century, Fes was the capital of the Idrisid dynasty, the first Islamic state based in present-day Morocco. According to one of the major early sources for the period, the Rawd al-Qirtas by Ibn Abi Zar, al-Qarawiyyin was founded as a mosque in 857 or 859 by Fatima al-Fihri, the daughter of a wealthy merchant named Mohammed al-Fihri. The family had migrated from Kairouan in Tunisia to Fes early in the ninth century, joining other migrants from Kairouan who had settled in a western district of the city. Fatima and her sister Mariam, both described as well educated, inherited a large sum from their father. Fatima is said to have vowed to spend her inheritance on a mosque for her community, and Mariam is likewise said to have founded the al-Andalusiyyin Mosque, across the river, in the same year.
That is the story as Fes has told it for centuries, and it is the story behind the familiar description of Fatima al-Fihri as the founder of the world’s oldest university. It should not be repeated as if it were settled fact, because modern historians have raised serious doubts about it. The symmetry of two sisters founding the two most famous mosques of Fes in the same year strikes some historians as too neat, and Ibn Abi Zar is judged by contemporary historians to be a relatively unreliable source.
More importantly, a foundation inscription rediscovered during twentieth-century renovations, hidden for centuries under plaster on a wall above the probable site of the original mihrab, proclaims the foundation of “this mosque” by Dawud ibn Idris, a son of Idris II who governed the region, in Dhu al-Qadah 263 AH — July to August 877. One recent study argues that this inscription is the original foundation inscription of al-Qarawiyyin itself, and that Fatima al-Fihri may be a legendary rather than a historical figure. Another reading, older, suggests the inscription came from another mosque and was moved here later, when veneration of the Idrisids was strong in Fes.
This guide therefore gives both dates and both names, and calls Fatima al-Fihri the traditional founder. Nothing in the building’s later importance depends on settling the question here. Whether the first mosque was paid for by a merchant’s daughter in 859 or ordered by an Idrisid governor in 877, a mosque stood on this ground in the ninth century, and it grew, without a long break, into the institution described below. Readers who want the full argument should follow the scholarly references in Sources, above all the Encyclopaedia of Islam entry on the mosque and the work of Chafik Benchekroun summarised in the modern history of the university.
What the first mosque looked like is better established than who paid for it. A major modern study of the building’s structure, published by the French archaeologist Henri Terrasse in 1968, traced the original mosque in the layout of the present building. It was a rectangular structure of about 36 by 32 metres, covering some 1,520 square metres, with a prayer hall of four transverse aisles running roughly east to west, parallel to the southern qibla wall, a courtyard of relatively small size, and a first minaret, also small, on the spot now occupied by the wooden anaza at the central entrance to the prayer hall from the courtyard. Water came at first from a well dug within the mosque’s precinct.
Teaching probably took place at al-Qarawiyyin from an early period, as it did in major mosques generally, which were multi-purpose buildings where learning happened alongside worship and civic life. When teaching became formal is harder to pin down. The earliest clear evidence cited by historians is from 1121, and different scholars date the mosque’s acquisition of a teaching function to the Almoravid period or to the Marinid period. The honest summary is that al-Qarawiyyin was a mosque where teaching happened long before anyone called it a university, and that the date at which it became a teaching institution in a formal sense is not recorded in the early sources.
The tenth century at al-Qarawiyyin: the minaret and the Friday mosque
In the tenth century the Idrisid dynasty fell, and Fes was contested between the Fatimid and Cordoban Umayyad caliphates and their allies. Al-Qarawiyyin nonetheless grew in prestige. At some point the Friday sermon, the khutba, was transferred to al-Qarawiyyin from the Shurafa Mosque of Idris II, today the Zawiya of Moulay Idris II, giving al-Qarawiyyin the status of the community’s main Friday mosque. The transfer is dated to either 919 or 933, both brief periods of Fatimid domination, which suggests it may have happened on Fatimid initiative. A tradition was established that all the other mosques in Fes timed their call to prayer by al-Qarawiyyin’s.
The first great expansion came in 956. The Zenata emir Ahmed ibn Abi Said, a ruler of Fes aligned with the Umayyads, wrote to the caliph Abd al-Rahman III in Cordoba for permission and funds to enlarge the mosque. The caliph agreed, and the work was carried out or completed in 956. It extended the mosque on three sides, taking in the area of the present-day courtyard to the north and reaching the current eastern and western boundaries. It also replaced the original minaret with a new, larger one that still stands today. Its square shaft set the pattern for the Maghrebi and Andalusian minarets that followed. At nearly 27 metres high, it is the earliest minaret that survives in Morocco, on the evidence of the foundation study cited in Sources.
A later embellishment, in 998, under the Amirid ruler al-Muzaffar, added a new minbar and a dome topped by talismans in the shape of a rat, a serpent and a scorpion. Only the dome survives, fluted or grooved on the outside, above the courtyard entrance to the prayer hall. A similar dome over the northern entrance, Bab al-Ward, the Gate of the Rose, likely dates from the same time.
The Almoravid expansion of al-Qarawiyyin: the prayer hall as it stands
The most significant expansion and renovation of al-Qarawiyyin was carried out between 1134 and 1143 under the Almoravid ruler Ali ibn Yusuf. The prayer hall was extended by dismantling the existing southern wall and adding three more transverse aisles, for a total of ten, replicating the format of the existing arches. The work required buying and demolishing neighbouring houses, including some that were apparently part of the nearby Jewish neighbourhood before the Mellah of Fes existed. That detail matters, because it shows how tightly the mosque was already hemmed in by the city — a condition that has never changed.
The Almoravid campaign also rebuilt the heart of the building. A new mihrab was set in the middle of the new southern wall, and the central nave — the arches along the central axis, running perpendicular to the southern wall from the courtyard to the mihrab — was reconstructed and embellished. A series of highly elaborate cupola ceilings in muqarnas, the honeycomb or stalactite-like sculpting of Islamic architecture, was added along the nave, decorated with arabesques and Kufic lettering. The craftsmen who worked on this expansion are mostly anonymous, and this guide does not invent names for them.
The mihrab itself dates from this Almoravid period, as do the earlier domes, and much of the decoration borrowed from the Andalusian ornamental style then fashionable: plasterwork sculpture, muqarnas domes, sculpted marble capitals, and epigraphic, geometrical and floral motifs, with Kufic inscriptions and floral compositions reminiscent of Islamic art in Spain. The minbar, the pulpit from which the Friday sermon is delivered, was brought from Cordoba in 1144 and is a characteristic piece of Cordoban wood carving, decorated with refined geometric and floral work. Under the Almohads, who took Fes in the 1140s, much of the Almoravid ornament was covered with plaster, and it was uncovered again only in twentieth-century restoration — which is why the prayer hall reads as a building with more than one skin.
The Marinid apogee of al-Qarawiyyin: madrasas, the library and the water clock
Many scholars regard the thirteenth and fourteenth centuries as al-Qarawiyyin’s high point as an intellectual centre, when its curriculum was at its broadest and its prestige at its height after centuries of expansion and elite patronage. The subjects taught around this period included the traditional religious subjects — the Quran and fiqh, Islamic jurisprudence — alongside grammar, rhetoric, logic, medicine, mathematics, astronomy and geography. Some subjects, such as alchemy and chemistry, were never officially taught, being considered too unorthodox.
From the late thirteenth century, and especially in the fourteenth, the Marinid dynasty built a ring of formal madrasas around al-Qarawiyyin’s main building. The first was the Saffarin Madrasa in 1271, followed by al-Attarine in 1323 and the Mesbahiya Madrasa in 1346. A larger but much later madrasa, the Cherratine, followed in 1670. These madrasas taught their own courses and sometimes became well-known institutions in their own right, but they usually had narrower curricula or specialisations.
One of their most important functions was practical: they housed students from other towns and cities, many of them poor, who needed somewhere to stay while studying at al-Qarawiyyin. They acted as auxiliary institutions to al-Qarawiyyin itself, which remained the centre of intellectual life in the city. Two of them, al-Attarine and Bou Inania, are open to visitors today and are the best way to see Marinid decoration at close quarters, since the mosque interior is not open to non-Muslims.
The library belongs to this period. Al-Qarawiyyin compiled a large manuscript collection kept at a library founded by the Marinid sultan Abu Inan Faris in 1349. Part of the collection had been gathered decades earlier by Sultan Abu Yusuf Ya’qub, who persuaded Sancho IV of Castile to hand over works from the libraries of Seville, Cordoba, Almeria, Granada and Malaga. Abu Yusuf first housed these in the nearby Saffarin Madrasa, but they were later moved to al-Qarawiyyin. The collection drew works from the Maghreb, al-Andalus and the Middle East, and it is treated in its own section below.
The Marinid period also gave al-Qarawiyyin its timekeeper’s chamber, the dar al-muwaqqit, on the northern side of the courtyard, where the muwaqqit determined the precise times of prayer with astrolabes and other scientific equipment of the era. Several water clocks were built for it. The first two no longer exist, but are described by the fourteenth-century historian al-Jazna’i. The first was commissioned by Abu Yusuf Ya’qub in the thirteenth century. A third and final water clock, built on the orders of Sultan Abu Salim Ali II, who ruled from 1359 to 1361, and designed by Abu Zayd Abd al-Rahman ibn Sulayman al-Laja’i, is still partly preserved today. A reconstruction of the fourteenth-century clock is displayed at the Museum of the History of Science and Technology in Islam in Istanbul. The clock is a reminder that al-Qarawiyyin was not only a place of religious learning: determining prayer times required astronomy, and astronomy required instruments, calculation and a room of its own.
In its Marinid heyday the mosque is described as having 270 pillars forming 16 naves of 21 arches each, 15 large doors reserved for men and 2 small doors for women, and 509 lamps, with a large central chandelier weighing 1,763 pounds. The building could then accommodate 22,700 people in its halls, on the Museum With No Frontiers account. The present-day figure of about 22,000 worshippers, given in the modern architectural summary, is consistent with that scale. Unlike most mosques in the Muslim west, the naves of al-Qarawiyyin run parallel, not perpendicular, to the qibla wall — a layout that suggests an eastern influence, probably that of the Great Mosque of Damascus.
Decline, reform and the modern university of al-Qarawiyyin
Al-Qarawiyyin declined in later centuries along with Fes. Teaching stagnated, the curriculum narrowed, and the institution became focused on traditional Islamic sciences and Arabic linguistic studies. Even some traditional specialisations, such as tafsir, Quranic exegesis, were progressively neglected or abandoned. In 1788–89 the ‘Alawi sultan Muhammad ibn Abdallah introduced reforms that regulated the programme but also imposed stricter limits, excluding logic, philosophy and the more radical Sufi texts. Other subjects, such as astronomy and medicine, disappeared over time. Between 1830 and 1906 the number of faculty fell from 425 to 266, of whom only 101 were still teaching. The library suffered in the same period: by the beginning of the twentieth century its collection had been reduced to around 1,600 manuscripts and 400 printed books, though many valuable historic items were retained.
Under the French Protectorate, from 1912, the French administration introduced structural reforms between 1914 and 1947 — calendars, appointments, salaries, schedules and administration, and the replacement of the ijazah with the shahada alamiyya — without modernising the content of teaching, which remained dominated by the traditional worldview of the ulama. Student numbers fell to 300 in 1922, as the Moroccan elite sent their children to newly founded Western-style colleges elsewhere. In 1931 and 1933, on the orders of Muhammad V, teaching was reorganised into elementary, secondary and higher education. Al-Qarawiyyin also played a role in the nationalist movement: many nationalists had been educated there, and in July 1930 the mosque took part in spreading the Ya Latif prayer in opposition to the Berber Dahir decreed by the French authorities two months earlier. In 1937 it was one of the rallying points for demonstrations after a crackdown on protesters in Meknes.
Women were first admitted to study at al-Qarawiyyin in the 1940s, after the women’s movement pressed the French colonial government of the time, and in 1947 al-Qarawiyyin was integrated into the state educational system. In 1963, after independence, it was officially transformed by royal decree into a university under the supervision of the Ministry of Education. Classes at the old mosque ceased, and a new campus was established at a former French Army barracks. Four faculties were founded in and outside the city: Islamic law in Fes, Arab studies in Marrakech, and two faculties of theology in Tetouan and near Agadir. Modern curricula and textbooks were introduced, and teacher training improved. In 1965 the institution was officially renamed University of Al Quaraouiyine. In 1975 General Studies was transferred to the newly founded Sidi Mohamed Ben Abdellah University, and al-Qarawiyyin kept the Islamic and theological courses. In 1988, after a break of almost three decades, the teaching of traditional Islamic education at al-Qarawiyyin was resumed by King Hassan II, in what has been interpreted as a move to bolster conservative support for the monarchy.
That 1963 date is the key to the “oldest university” claim, and it should be stated plainly. UNESCO and Guinness World Records have cited al-Qarawiyyin as the oldest university, or the oldest continually operating higher learning institution, in the world. Many scholars distinguish that status from the status of “university”, which they view as a distinctly European invention, and date al-Qarawiyyin’s transformation from a madrasa into a university to its modern reorganisation in 1963. Both statements can be true at once: the institution on this site has taught, with interruptions and changes of form, since the ninth century, and it became a university in the modern institutional sense in 1963. An article that calls it simply “the oldest university in the world, founded in 859” without that qualification overstates what the evidence supports. This guide uses the fuller form: founded as a mosque in 857–859, a leading centre of learning for centuries, reorganised as a state university in 1963.
What to see at al-Qarawiyyin
What follows is written for a visitor who cannot enter the mosque. That is not a limitation invented for this guide: it is the rule, and it shapes the visit. The experience of al-Qarawiyyin for a non-Muslim visitor is an experience of thresholds — doorways, a courtyard glimpsed from a lane, a library entrance on a square, madrasas next door that do open. Planned that way, it is a rewarding half-day in Fes el-Bali. Planned as a conventional monument visit, it disappoints, through no fault of the building.
1. The courtyard (sahn) of al-Qarawiyyin, seen through the doorways
The courtyard is rectangular, surrounded by the prayer hall on three sides and by a gallery to the north. Its floor is paved with Moroccan mosaic tile, zellij, and at its centre stands a fountain. At the western and eastern ends stand two ornate Saadian pavilions, each sheltering another fountain. The pavilions have pyramidal domes and emulate the pavilions in the Court of the Lions in the Alhambra in Spain. They are decorated with carved wood and stucco, mosaic-tiled walls and marble columns, and they date from the late sixteenth and early seventeenth centuries, the Saadian period.

From outside, the courtyard is reached through the main northern gate, Bab al-Ward, whose vestibule is covered by a Marinid-era white dome, fluted on the outside and covered in painted and carved stucco inside. Opposite this gate, on the mihrab axis, is the central entrance to the prayer hall, guarded by a carved and painted wooden screen called the anaza, installed in 1289. The anaza acted as a symbolic entrance: it marked the threshold of the prayer hall without being a door that opened. Do not step over a threshold or block a doorway to look in, and do not photograph worshippers. The best views come when a door stands open outside prayer times, and patience is part of the visit. The courtyard is at its clearest in the morning light, when the green-tiled roofs of the prayer hall and the white minaret are visible above the lanes.
2. The minaret of al-Qarawiyyin
The minaret stands at the western end of the courtyard, and it is the part of al-Qarawiyyin most easily seen from the lanes of Fes el-Bali. It is a square tower of nearly 27 metres, built in freestone and later covered with plaster and polished whitewash. It was built in 956, replacing the small first minaret, and it is the earliest surviving minaret in Morocco. Its square form became the pattern for later Maghrebi minarets. From a distance, the minaret and the green-tiled roofs of the prayer hall are the two markers by which the mosque can be picked out on the Fes el-Bali skyline. There is no public access to the minaret, and none should be expected.

3. The prayer hall and the central nave of al-Qarawiyyin
The prayer hall takes up most of the mosque’s area. It is a hypostyle hall: a forest of pillars and horseshoe arches, with the aisles running parallel to the qibla wall, as described above. The central nave, running from the courtyard to the mihrab, is the architectural spine of the building. Along it, the Almoravid cupola ceilings in muqarnas, decorated with arabesques and Kufic lettering, are the finest surviving work of the twelfth-century campaign. Almohad and Marinid chandeliers hang in the nave, including the large bronze chandelier donated by the Almohads in 1203.

Non-Muslim visitors will not see the nave from inside, and this guide does not pretend otherwise. What can be seen from a doorway is a glimpse of arches receding into shade, and that glimpse is worth taking slowly. The hall’s scale — about half a hectare for the complex as a whole, with room for about 22,000 worshippers — is easier to grasp from the courtyard and the lanes than from any single interior view would be. The exterior, as the modern architectural summary notes, does not generally present a monumental appearance: the mosque is integrated into the dense urban fabric around it, with no outer facade. That integration is itself the point. Al-Qarawiyyin was never a freestanding monument; it is a building the city grew around, and grew into.
4. The mihrab and the minbar of al-Qarawiyyin
The mihrab, the niche in the qibla wall that marks the direction of prayer, dates from the Almoravid expansion of 1134–1143. It is decorated with carved and painted stucco in the Andalusian manner, with horseshoe arch and a frame decorated with geometrical and floral Andalusian art, bordered with Kufic calligraphy. The minbar beside it, brought from Cordoba in 1144, is a piece of Cordoban wood carving of the same period. Neither can be seen closely by a non-Muslim visitor, and both are mentioned here so that a doorway glimpse can be read correctly: the domes and stucco visible along the central nave belong to the same Almoravid campaign as the mihrab, and the minbar’s Cordoban origin is part of the same exchange of craftsmen and materials between Fes and al-Andalus that shaped the whole building.
5. The doors of al-Qarawiyyin: Bab al-Ward and Bab al-Gna’iz
Al-Qarawiyyin has many doors, and they repay attention. Bab al-Ward, the Gate of the Rose, is the main northern entrance, with its Marinid dome and its fluted exterior. The doors of Bab al-Gna’iz, the Gate of the Funerals, carry replicas of the original Almoravid bronze overlays; fragments of the original overlays, dating to the Almoravid period, survive and have been studied and photographed. The doors are not decoration added to the building: in a mosque with no facade, the doors are the facade, and the bronze work, the carved wood and the stucco around them carry the building’s public face. Walk the perimeter lanes slowly, and the complex reveals itself door by door, rather than all at once.
6. The timekeeper’s chamber and the water clock of al-Qarawiyyin
On the northern side of the courtyard stands the dar al-muwaqqit, the chamber of the timekeeper, equipped in the Marinid period with astrolabes and other scientific instruments for determining prayer times. The water clocks built for it — the first commissioned in the thirteenth century, the second restored between 1346 and 1349, the third built in 1359–1361 and still partly preserved — are described in the history section above. Nothing of the clocks is on public display at al-Qarawiyyin itself, and visitors should not expect to see one. The chamber’s interest is historical: it shows a mosque that needed, and paid for, precision timekeeping, and it connects al-Qarawiyyin to the astronomy and mathematics taught in its curriculum. The reconstruction in Istanbul is the place to see what the clock looked like, not Fes.
7. The surrounding madrasas and Place Seffarine
Finish the circuit outside the mosque, not inside it. The Saffarin Madrasa of 1271, the al-Attarine Madrasa of 1323 and the Mesbahiya Madrasa of 1346 stand in the lanes around al-Qarawiyyin, and al-Attarine in particular, just north of the mosque, is open to visitors and shows Marinid carved stucco, wood and tilework at the scale of a single courtyard. The Bou Inania Madrasa, built by the same sultan who founded the library, Abu Inan Faris, stands a short walk away and is the fullest Marinid madrasa open in Fes. Together they explain what the mosque alone cannot: the madrasas were the student housing and the classrooms of the Qarawiyyin world, and their courtyards are where the decoration of the period can be studied without a threshold in the way.
Place Seffarine, the coppersmiths’ square, lies on the southern side of the complex. The hammering of copper and brass workers, making trays, pots and lanterns, is the sound of the square, and it has been for centuries. The library entrance opens onto this square, which is why the library, unlike the mosque, has a public face that a visitor can stand in front of. The square also holds the Saffarin Madrasa and the workshops that supplied the mosque and the city. Stand there, listen, and the scholarly quarter of medieval Fes becomes easier to imagine than it is from any single doorway.
The library of al-Qarawiyyin
The library is the part of al-Qarawiyyin where the word “oldest” needs the most care, and where the recent history is the most encouraging. The library founded by Abu Inan Faris in 1349 is among the oldest working libraries anywhere, and the collection it holds is one of the most important manuscript collections in the Islamic world. But the library building that visitors meet today is not a single fourteenth-century room. It has been rebuilt, expanded and restored across the centuries, most recently between 2012 and 2016. The record belongs to the institution, not to one room, and the manuscripts have moved, been lost, been gathered and been restored across six centuries.

The collection today holds roughly 4,000 manuscripts. Among the most precious are volumes from the Al-Muwatta of Malik, written on gazelle parchment; a copy of the Sirat, the biography of the Prophet, by Ibn Ishaq; a ninth-century Quran manuscript, also written on parchment; a copy of the Quran given by Sultan Ahmad al-Mansur in 1602; a copy of Ibn Rushd’s Al-Bayan wa-al-Tahsil, a commentary on Maliki fiqh, dating from 1320; and the original copy of Ibn Khaldun’s Al-‘Ibar, including the Muqaddimah, gifted by the author himself in 1396. A document recently rediscovered in the library, an ijazah certificate written on deer parchment, is claimed by some scholars to be the oldest surviving predecessor of a medical doctorate degree, issued to a man called Abdellah Ben Saleh Al Koutami in 1207, under the authority of three other doctors and in the presence of the city’s chief qadi and two other witnesses. That claim is reported here as a claim, not as settled fact: it rests on the interpretation of a single document, and this guide does not present it as proven.
The scale of what was lost is part of the story. By 1613 one conservator, the qayim who oversaw the collection, estimated it at 32,000 volumes. By the beginning of the twentieth century it had fallen to around 1,600 manuscripts and 400 printed books, most likely through lax supervision and books that were not returned. The twentieth-century expansion and the 2012–2016 restoration were, in that sense, rescues as much as renovations.
The restoration was led by the Moroccan-Canadian architect Aziza Chaouni, a native of Fes, who was asked by the Moroccan Ministry of Culture in 2012 to take charge of the library. The building had suffered from damp, a blocked drainage system, broken tiles, cracked wooden beams and exposed wiring, and manuscripts were at risk from water coming through the roof. The restoration, which took four years and reopened the library in May 2016, repaired the structure and the climate control, added solar panels, a new gutter and drainage system, digital locks for the rare books room and air conditioning to control humidity, and created a reading room, stacks, a conference room, an exhibition space in an older vaulted chamber, a manuscript restoration and digitisation laboratory, and a cafe. Furniture was commissioned from local craftsmen using native wood. The project was funded in part by a grant from the Arab Bank in Kuwait for cultural preservation, made to the Ministry of Culture in 2012.
Whether a general visitor can go inside the library on a given day is the one practical question on which sources disagree, and this guide does not resolve the disagreement by choosing a side. Some visitor guides report that the reading room and restored galleries are open to walk-through visits during set daytime hours, with access to the manuscript collection itself reserved for accredited researchers by appointment. Others report that the library opens only to accredited researchers by appointment, and that general visitors cannot enter. The safest advice, and the advice this guide gives, is to treat library entry as uncertain: go to the entrance on Place Seffarine, ask on the day, and do not plan a day in Fes around guaranteed entry to the reading room. The manuscript stacks, in every account, require academic credentials and advance application. What is certain is that the library exists, that it was rescued, and that its entrance, on the coppersmiths’ square, is the one part of the Qarawiyyin complex designed to be approached from the street.
Scholars and teaching at al-Qarawiyyin
The scholars associated with al-Qarawiyyin are often listed as if they were alumni of a modern university, with dates of attendance. The evidence is rarely that neat. Most of the names below are scholars who studied or taught at al-Qarawiyyin, lived in Fes and worked in its orbit, or are traditionally connected with it. The distinctions matter, and the weakest claims are marked as such.
Ibn Khaldun (1332–1406), historian and philosopher, is the strongest connection: his Al-‘Ibar, including the Muqaddimah, survives in the library in the copy he gifted in 1396, and he is listed among the scholars who studied or taught at the Qarawiyyin. Maimonides (1135/1138–1204), the Jewish philosopher, Ibn Arabi (1165–1240), the Sufi philosopher, and Leo Africanus (1494–1554), author of the Description of Africa, are likewise listed among its notable scholars. Ibn Rushd, Averroes, is named by Britannica among the scholars educated at Qarawiyyin, and his commentary on Maliki fiqh survives in the library in a 1320 copy. The twelfth-century cartographer Muhammad al-Idrisi is said to have lived in Fes for some time, which suggests he may have worked or studied at al-Qarawiyyin; the connection is suggestive, not proven. Earlier figures include Abu Imran al-Fasi (died 1015), a leading theorist of the Maliki school, Ibn Rushayd al-Sabti (died 1321), and Muhammad Ibn al-Hajj al-Abdari al-Fasi (died 1336).
One famous name should not be listed without a warning. Gerbert d’Aurillac, later Pope Sylvester II, is sometimes said to have studied at al-Qarawiyyin in the tenth century, a claim that goes back to a nineteenth-century orientalist. Modern scholarship has produced no evidence to support the story, and it is repeated here only to be set aside. Britannica lists Sylvester II among the scholars educated at Qarawiyyin; the modern history of the university records that the claim is unsupported. A guide that repeats the Sylvester story as fact misleads its readers, however good the story is.
The curriculum, at its broadest in the thirteenth and fourteenth centuries, covered the Quran and fiqh, grammar, rhetoric, logic, medicine, mathematics, astronomy and geography, alongside the transmitted religious sciences — Islamic law, theology and the study of Arabic — that remained its core. By the fourteenth century there were said to be 8,000 students at the university, a figure Britannica reports as a contemporary claim rather than a counted enrolment, and this guide reports it in the same form. Teaching was delivered in the traditional manner that survives in part today: students seated in a semi-circle around a sheikh, who prompts them to read sections of a text, questions them on grammar, law or interpretation, and explains difficult points. Students came from all over Morocco and Muslim West Africa, with some from further abroad.
Today, education at the University of al-Qarawiyyin concentrates on the Islamic religious and legal sciences, with particular strengths in classical Arabic grammar and linguistics and Maliki Sharia, though lessons in other subjects, including French and English, are also offered. Prospective students are required to be Muslim, to have memorised the Quran and other shorter medieval texts on grammar and Maliki law, and to be proficient in classical Arabic. Most students are between 13 and 30 years old, studying towards high-school-level diplomas and university bachelor’s degrees, though Muslims with a sufficient level of Arabic can attend lecture circles informally. The university is attended by students from Morocco and West Africa, and by some from further abroad, including Spanish Muslim converts drawn by the Andalusian heritage of Moroccan scholarship. That continuity — a mosque school that became a state university without leaving its medina — is the real claim al-Qarawiyyin can make, and it needs no embellishment.
Conservation and the living medina of al-Qarawiyyin
Al-Qarawiyyin stands inside a medina that UNESCO describes as one of the most extensive and best conserved historic towns of the Arab-Muslim world, a living town whose unpaved urban space conserves most of its original functions. The Medina of Fez was inscribed in 1981 under criteria (ii) and (v): as a living witness to a flourishing city that exercised considerable influence, from the twelfth to the fifteenth centuries, on architecture, monumental arts and town-planning in North Africa, Andalusia and sub-Saharan Africa, and as an outstanding example of a medieval town created in the first centuries of the Islamisation of Morocco. The property includes Fes el-Bali and Fes Jedid, founded in 1276, which together form one of the largest Islamic metropolises, with a great variety of architectural forms and urban landscapes.
The problems UNESCO noted in 2009 remain the context for any visit: deterioration of buildings, an over-populated area, and pressure from uncontrolled urban development on the surroundings of the medina, which must be maintained as a non-constructible zone to protect the visual integrity of the property. The State adopted a Development Plan of the Medina in 2001, re-evaluated every ten years, and safeguarding work on houses threatened with collapse and the rehabilitation of remarkable monuments has been entrusted to the Agency for De-densification and Rehabilitation of the Medina of Fez, with the Ministry of Culture responsible for inspection and monitoring. The library restoration of 2012–2016 belongs to that programme of repair, and so does the early twenty-first-century rehabilitation of the mosque itself, which aimed not only to preserve the historic fabric but to revive the mosque’s cultural and social role for the citizens of Fes.
For a visitor, the practical meaning of conservation is simple: this is not a museum quarter. The lanes around al-Qarawiyyin are working streets, the mosque is a working mosque, and the library is a working library. The respect owed to the building is the respect owed to a place in use, not to a monument on display. That is why the visiting guidance below is framed as etiquette first and sightseeing second.
Planning your visit to al-Qarawiyyin
Al-Qarawiyyin is in the lower part of Fes el-Bali, beside the al-Attarine Madrasa and Place Seffarine, in the dense lanes below Bab Bou Jeloud, the Blue Gate. The walk from Bab Bou Jeloud through the Talaa Kebira is the usual approach, and it takes 15 to 20 minutes at a steady pace, longer if you stop — as you should — at the madrasas and workshops on the way. The medina’s lanes are unmarked and easy to lose your bearings in; a guide is not required, but a first visit with a licensed local guide, who can explain what is behind each doorway and when a door is likely to be open, will show more than a solitary walk. If you walk alone, follow the sound of the coppersmiths to Place Seffarine, and the green-tiled roofs and the white minaret above the lanes to the mosque.
There is no ticket and no published visitor opening time for the mosque, because the mosque is not a visitor attraction. Plan around prayer times, when doors close and the lanes fill with worshippers, and go outside prayer times for the best chance of a doorway view. Dress conservatively throughout Fes el-Bali, with shoulders and legs covered, out of respect for an active religious site and a conservative medina, not only at the mosque itself. Do not enter the mosque if you are not Muslim. Do not block a doorway while looking in, do not step over a threshold, and do not photograph people at prayer. The rule is firm and widely enforced, and it is also the right rule: the prayer hall is a place of worship first, and a historic interior second.
For the library, go to the entrance on Place Seffarine and ask on the day. Do not rely on a published timetable, because none is consistently published, and do not promise yourself entry to the reading room. If entry is possible, it will be to the reading room and galleries; the manuscript collection itself is for accredited researchers. If it is not possible, the square, the coppersmiths, the Saffarin Madrasa exterior and the neighbouring madrasas are a full visit in themselves, and the library’s story can be carried with you from this guide.
Combine al-Qarawiyyin with the madrasas that open: al-Attarine, immediately north of the mosque, and Bou Inania, a short walk away, both Marinid, both richly decorated, both open to visitors for a small entry fee that varies and should be confirmed at the door. The Chouara tannery, the Nejjarine woodwork museum and the Fes el-Bali lanes are all within walking distance, and a half-day that links them — madrasa, mosque doorways, Place Seffarine, tannery — gives a truer picture of medieval Fes than any single monument. Our guides to the manuscripts of Fez and Rabat (https://lahbabiguide.com/history-of-moroccan-manuscripts-libraries/), to Volubilis (https://lahbabiguide.com/volubilis-morocco/) and to Bahia Palace (https://lahbabiguide.com/bahia-palace-marrakech/) are linked here for readers who want to set al-Qarawiyyin in the longer history of Moroccan learning and building.
A final practical note: al-Qarawiyyin has no grand facade and no sign that announces it. Visitors who look for a monument will walk past it. Visitors who look for a white square minaret above green-tiled roofs, a carved wooden door in a lane, a courtyard glimpsed through an open gate, and a square full of hammering will find it, and will have found it in the way Fes itself presents it — not as a sight, but as a presence in the middle of a living city.
Frequently asked questions about al-Qarawiyyin
Is al-Qarawiyyin really the oldest university in the world?
In the form usually quoted, the claim needs qualification. UNESCO and Guinness World Records have cited al-Qarawiyyin as the oldest university, or the oldest continually operating higher learning institution, in the world. The institution was founded as a mosque in 857–859, taught for centuries as a mosque school and madrasa, and was reorganised as a state university in 1963. Many scholars date its transformation into a university in the modern sense to 1963, and distinguish the madrasa from the European invention of the university. The accurate statement is the longer one: a ninth-century mosque that became a leading centre of learning, and a modern university since 1963, on the same site and in continuous use as a place of worship and teaching.
Who founded al-Qarawiyyin, Fatima al-Fihri or Dawud ibn Idris?
Both names appear in the evidence, and this guide does not choose between them. The traditional account, from Ibn Abi Zar’s Rawd al-Qirtas, credits Fatima al-Fihri, daughter of a wealthy merchant from Kairouan, with founding the mosque in 857 or 859. A foundation inscription rediscovered in the twentieth century names Dawud ibn Idris and dates the mosque to 877. Some modern historians argue the inscription is the original foundation record and that Fatima al-Fihri may be legendary; others argue the inscription was moved from another mosque. Fatima al-Fihri is therefore called the traditional founder in this guide.
Can non-Muslim visitors enter al-Qarawiyyin?
No, not the mosque. The prayer hall is reserved for Muslim worshippers, as it has been since the mosque’s foundation. Non-Muslim visitors can view the courtyard through open doorways, principally Bab al-Ward and the doors on the surrounding lanes, and can walk the lanes around the complex and stand on Place Seffarine. The library entrance on Place Seffarine has separate arrangements, which vary: ask on the day, and expect manuscript access to be limited to accredited researchers.
Can visitors see inside the al-Qarawiyyin library?
Sometimes, and only in part. Reports differ on whether the reading room and restored galleries admit general visitors during set daytime hours, or whether the library admits only accredited researchers by appointment. In every account, access to the manuscript collection itself requires academic credentials and advance application. Treat entry as uncertain, ask at the entrance on Place Seffarine, and do not plan a day around guaranteed access. The library reopened in May 2016 after the 2012–2016 restoration led by Aziza Chaouni.
What is the oldest manuscript in the al-Qarawiyyin library?
The most frequently cited treasures are a ninth-century Quran on parchment, volumes of the Al-Muwatta of Malik on gazelle parchment, and the author’s own copy of Ibn Khaldun’s Al-‘Ibar, gifted in 1396. The collection holds about 4,000 manuscripts in total. No single manuscript should be called “the oldest” without qualification, because dating and survival differ between the Quran manuscript, the Al-Muwatta volumes and the other early works, and because the collection was much larger in the seventeenth century than it is today.
How long should a visit to al-Qarawiyyin take?
Allow 30 to 60 minutes for the lanes around the mosque, the doorway views and Place Seffarine, and half a day if you add the al-Attarine and Bou Inania madrasas, the Nejjarine museum and the Chouara tannery. There is no ticket for the exterior, and no single viewpoint that shows the whole complex, so the visit is a walk, not a tour of one building. Morning, outside prayer times, gives the clearest doorway views and the best light on the courtyard.
Conclusion
Al-Qarawiyyin rewards the visitor who arrives with the right expectation. It is not a monument that opens its doors, but a mosque, a library and a university that have shared one site in Fes el-Bali for more than eleven centuries, growing by accretion — a minaret in 956, a prayer hall in the twelfth century, madrasas and a library in the fourteenth, a state university in 1963, a restored library in 2016 — without ever becoming a single, finished building. The foundation story carries a genuine historical dispute, and the “oldest university” claim carries a genuine definitional one. Neither dispute diminishes the place. If anything, they are the point: al-Qarawiyyin has been argued over, rebuilt, neglected, reformed and restored for as long as Fes has existed, and it is still in use, still teaching, still prayed in, and still keeping its manuscripts behind a door on a square full of hammering. Go to look through the doorways, to stand on Place Seffarine, and to see the madrasas next door, and you will have seen al-Qarawiyyin as Fes sees it: not as a sight to be entered, but as the centre around which a whole quarter of learning, craft and worship still turns.
Sources
Official and primary sources
- UNESCO World Heritage Centre, “Medina of Fez”, World Heritage List 170, inscribed 1981, criteria (ii) and (v). https://whc.unesco.org/en/list/170/ — Brief synthesis, integrity, authenticity and protection requirements, checked 3 December 2026.
- Museum With No Frontiers, Discover Islamic Art, “Qarawiyyin Mosque”, by Mohamed Mezzine. https://islamicart.museumwnf.org/database_item.php?id=monument%3BISL%3Bma%3BMon01%3B1%3Ben — Monument record: foundation, Almoravid, Almohad, Marinid and Saadian phases, 270 pillars, 22,700 capacity, 140 teaching posts. Checked 3 December 2026.
Secondary sources
- Encyclopaedia Britannica, “Qarawiyyin”. https://www.britannica.com/topic/Qarawiyyin — Foundation in 859 by Fatima al-Fihri, scholars educated at Qarawiyyin, curriculum, 8,000 students in the fourteenth century as a reported figure. Checked 3 December 2026.
- “University of al-Qarawiyyin”, Wikipedia, synthesising Terrasse (1968), Benchekroun, Deverdun, Tazi (1972) and the Encyclopaedia of Islam 3 entry on the al-Qarawiyyin Mosque. https://en.wikipedia.org/wiki/University_of_al-Qarawiyyin — Foundation narrative and inscription, teaching history, Marinid apogee, water clocks, decline and 1963 reorganisation, architecture. Checked 3 December 2026. Wikipedia was used only as a route to its cited studies; every load-bearing claim in this article is also supported by one of the other sources listed here.
- World History Encyclopedia, “Fatima Al-Fihri and Al-Qarawiyyin University”. https://www.worldhistory.org/article/2662/fatima-al-fihri-and-al-qarawiyyin-university/ — Traditional foundation narrative from the Rawd al-Qirtas, 857–859 construction, Kairouan origin of the name. Checked 3 December 2026.
- Muslim Heritage (Foundation for Science, Technology and Civilisation), “Al-Qarawiyyin Mosque and University”. https://muslimheritage.com/qarawiyyin-mosque-university/ — Structural evolution, 956 expansion, Almoravid extension 1135, minbar from Cordoba 1144, Almohad chandelier 1203. Checked 3 December 2026.
- NPR / Associated Press reporting, “The Delicate Task of Restoring One of the World’s Oldest Libraries”, 21 May 2016. https://www.nprillinois.org/arts-life/2016-05-21/the-delicate-task-of-restoring-one-of-the-worlds-oldest-libraries — Four-year restoration, 4,000 manuscripts, ninth-century Quran, Ibn Khaldun’s Muqaddimah, Aziza Chaouni. Checked 3 December 2026.
- Visitor guidance on access, checked 3 December 2026, with the variation between sources stated in the text: Visit Fes, “Al-Qarawiyyin Mosque & University”, https://visit-fes.com/fr/al-qarawiyyin-fez ; Slow Morocco, “Al-Qarawiyyin Library, Fes”, https://www.slowmorocco.com/places/kairaouine-library ; and the library-access reporting summarised in the NPR/AP account above. No opening hours or ticket price is stated in this article, because no consistent published figure was found; the absence of a ticket for exterior viewing is stated as reported.
Access dates: all sources accessed 3 December 2026. Where sources differ, the article states the difference in the text; no single invented figure has been used for any date, dimension, capacity or manuscript count.