Standing at the physical and spiritual center of Fes el-Bali, Al Quaraouiyine Mosque (also spelled Al-Qarawiyyin or Al Karaouine) is far more than an old monument—it is recognized by both UNESCO and Guinness World Records as the oldest existing, continuously operating degree-granting university on Earth. Founded in 859 AD by a Tunisian-born scholar's daughter named Fatima al-Fihri, the complex predates the University of Bologna by more than two centuries and Oxford by roughly 230 years.
Before you walk deep into the Fes medina expecting to buy an entry ticket and stroll through lecture halls, know the ground reality right away: Al Quaraouiyine Mosque is an active Friday mosque, and non-Muslims are not allowed inside the prayer hall or the main courtyard. Even so, circling its perimeter is essential in Fes. Between prayer times, several of its towering bronze-and-cedar gates stand open, letting you look respectfully into the white marble courtyard (sahn) and green-tiled Saadian pavilions from the street—and right across the lane sit open Marinid madrasas and rooftop terraces that put the mosque's massive emerald-green roofs right in front of you.
This 2027 guide covers everything worth knowing before you go: how to see Al Quaraouiyine Mosque respectfully from the best doorways and rooftops, the real current access status of the famous Al Quaraouiyine Library, the true story of Fatima al-Fihri, and why the spelling changes on every map you read.

Quick-Answer Fact Sheet: Al Quaraouiyine Mosque & University
Keep these verified facts handy while planning your walk through Fes:
| Key Detail | Verified 2027 Information |
|---|---|
| Official & Variant Names | Al Quaraouiyine (French/Moroccan standard), Al-Qarawiyyin (English academic), Al Karaouine (older travel guides) |
| Founded | 859 AD (245 AH) during the Idrisid Dynasty |
| Founder | Fatima al-Fihri (Fatima bint Muhammad al-Fihriyya), originally from Kairouan, Tunisia |
| Location | Heart of Fes el-Bali (car-free UNESCO medina), ~15–20 minutes on foot from Bab Bou Jeloud |
| Mosque Entry for Non-Muslims | Closed (Active place of worship; exterior & doorway views only) |
| Entry Ticket Price | Free (exterior perimeter walk; nearby Al-Attarine Madrasa costs ~20–30 MAD) |
| Al Quaraouiyine Library Access | Variable / Restricted — restored in 2016, but tourist entry to reading rooms is frequently restricted to researchers; confirm on the day at Place Seffarine |
| Best Time to Walk Around | 9:30 AM – 11:30 AM (between morning and midday prayers, when doors are often open and crowds are lighter) |
Why Does Al Quaraouiyine Mosque Have Three Different Spellings?
Open three different travel maps of Fes and you will see Al Quaraouiyine, Al-Qarawiyyin, and Al Karaouine pointing to the exact same building. None of them is wrong—they are just different attempts to write the Arabic name (جامعة القرويين) in the Latin alphabet:
- Al Quaraouiyine: The official French-influenced spelling used by the Moroccan government, road signs, and the modern university's official website (
uaq.ma). - Al-Qarawiyyin: The strict academic English transliteration preferred by historians, UNESCO English texts, and Wikipedia.
- Al Karaouine / Kairaouine: The older phonetic spelling left over from 20th-century French guidebooks and still printed on many medina wall signs.
The word itself literally means "of the people of Kairouan"—a direct tribute to the historic city of Kairouan in Tunisia, where the founder's family migrated from in the 9th century.
The Story of Fatima al-Fihri: How One Woman Built the World's Oldest University
Most "oldest in the world" tourist claims crumble when historians look closely. The story behind Al Quaraouiyine Mosque holds up—and it is all the more remarkable because of who built it.
In the early 9th century, a wealthy merchant named Muhammad al-Fihri moved his family from Kairouan (in modern-day Tunisia) to the newly founded city of Fes, then the capital of Morocco's first Islamic state under the Idrisid dynasty. When Muhammad passed away, he left a substantial fortune to his two educated daughters, Fatima and Mariam.
Rather than spending their inheritance on private palaces, both sisters invested it directly into the young city's civic life:
- Fatima al-Fihri bought an open garden plot on the western bank of the Fes River (Adwat al-Qarawiyyin) and broke ground on Al Quaraouiyine Mosque in 859 AD (Ramadan 245 AH). According to the 14th-century Moroccan chronicler Ibn Abi Zar, Fatima fasted every single day of construction until the prayer hall was finished, insisting that every stone and bucket of mortar come from quarries and wells excavated directly on the purchased land.
- Mariam al-Fihri simultaneously built the Al-Andalusiyyin Mosque across the river on the eastern bank to serve refugees arriving from Córdoba in Al-Andalus (southern Spain).
From Mosque School to World-Famous University
In early Islamic civilization, major mosques were not just prayer rooms—they were community courthouses, libraries, and lecture halls. Scholars sat against specific marble pillars holding study circles (halaqat) covering Islamic jurisprudence (Fiqh), grammar, rhetoric, astronomy, medicine, mathematics, and music. Students who mastered a discipline received an ijaza—a formal written license certifying them to teach that subject elsewhere, which functioned as the direct ancestor of the modern university degree.
Over the centuries, ruling Moroccan dynasties—especially the Almoravids (12th century), Marinids (14th century), and Saadians (16th–17th centuries)—expanded the prayer hall until it could hold roughly 20,000 worshippers, turning the mosque into the intellectual magnet of the western Mediterranean.
Famous Scholars Linked to Al Quaraouiyine University
A remarkable roster of medieval thinkers studied, taught, or worked inside the scholarly orbit of Al Quaraouiyine:
- Ibn Khaldun (1332–1406): Widely regarded as the father of modern sociology, historiography, and economics; he studied and worked in Fes during the 1350s and later donated an original signed copy of his monumental Kitab al-Ibar (which includes the Muqaddimah) to the Al Quaraouiyine Library.
- Ibn Rushd (Averroes): The Andalusian philosopher and royal physician whose commentaries on Aristotle helped spark the European Renaissance.
- Maimonides (Musa ibn Maymun): The renowned Jewish philosopher, rabbi, and physician who lived and studied in Fes in the 1160s after fleeing Almohad Córdoba.
- Al-Idrisi: The 12th-century geographer whose world map (Tabula Rogeriana) guided European and Mediterranean navigators for three centuries.
- Leo Africanus (al-Hasan al-Wazzan): Diplomat and author of Description of Africa, who studied in Fes before his capture by pirates led him to Pope Leo X's court in Rome.
- Pope Sylvester II (Gerbert of Aurillac): Popular tradition claims that the future French pope studied mathematics at Al Quaraouiyine in the late 10th century and introduced Arabic numerals and the concept of zero to Christian Europe. Modern historians note he likely absorbed Arabic math via Catalonia in northern Spain rather than traveling physically to Fes, though the texts he studied circulated directly between Córdoba and Fes.
Historical Accuracy: How Al Quaraouiyine Operates Today (vs. Sidi Mohamed Ben Abdellah University)
Historians occasionally debate whether medieval mosque-madrasas fit the strict European legal definition of a universitas. Regardless of semantics, UNESCO and Guinness World Records credit Al Quaraouiyine as the oldest continuously operating higher-learning institution because teaching there never ceased for over 1,165 years.
In the early 1960s (1963), Morocco formally integrated Al Quaraouiyine into the modern state university system as Université Al Quaraouiyine. A decade later, in 1975, secular faculties (science, engineering, law, and humanities) in Fes were spun off into Sidi Mohamed Ben Abdellah University, while Al Quaraouiyine University retained its historic mandate overseeing Islamic studies, Sharia law, Arabic heritage, and religious scholarship across Morocco. Today, the mosque in Fes el-Bali remains an active place of worship and traditional study, while administrative campuses sit outside the old walls.
Can Non-Muslims Visit Al Quaraouiyine Mosque? (2027 Visiting Rules)
No—non-Muslims cannot enter Al Quaraouiyine Mosque or step across its doorways into the courtyard. Under Moroccan religious custom (explained in full in our Morocco Rules for Tourists guide), active mosques throughout the Kingdom are reserved exclusively for Muslim worshippers, with Casablanca's Hassan II Mosque being the sole major exception.
Do not let a street tout tell you "Come with me, my uncle has the key to the secret door for 100 dirhams." That is a classic medina hustle—nobody can get a non-Muslim inside the prayer hall. (Read How to Deal with Persistent Street Sellers in Morocco before entering Fes el-Bali so you don't fall for fake guide promises).

What You CAN See: The Best Gates & Viewpoints Around the Perimeter
Because the mosque is tightly hemmed in by centuries-old spice stalls, bookbinders, and workshops, you will never see a grand open plaza in front of it. Instead, Al Quaraouiyine Mosque reveals itself piece by piece as you walk a slow 15-minute loop around its outer walls, which contain 14 to 18 separate gates.
Pause at these specific spots to catch the best views without crossing a single threshold:
- Bab al-Ward ("Gate of the Rose") — Northern Side: The grandest entrance on the north perimeter, fitted with restored 12th-century Almoravid bronze door overlays. When open between prayers, standing two steps back in the lane gives you a crystal-clear straight view across the white marble courtyard (sahn), central fountain, and the delicate Saadian pavilion modeled directly on the Court of the Lions at Spain's Alhambra!
- Bab al-Hafa ("Gate of the Barefooted") — Just West of Bab al-Ward: Dating to the Almohad era, look down just inside the threshold and you will spot a shallow stone channel carrying running water across the floor—built centuries ago so worshippers could rinse dusty feet as they stepped in.
- Derb Boutouil & Bab Sbitriyyin — Western Side: Tall, shadowed horseshoe arches framing rows of crisp white prayer-hall columns receding into soft lantern light.
- Place Seffarine (Coppersmiths' Square) — Southeastern Side: The liveliest open square hugging the mosque's eastern flanks. Sit on the shaded stone steps listening to rhythmic hammer blows on copper pots while looking up at the mosque's green-tiled eaves and the entrance to the historic library.

Best Elevated Viewpoints for the Iconic Green Roofs
From street level, the sheer scale of Al Quaraouiyine Mosque is hidden by surrounding houses. To actually see its sprawling half-hectare footprint and famous emerald-green pyramidal roofs:
- Al-Attarine Madrasa Upper Floors (2-minute walk): Climb the steep stairs inside this neighboring Marinid college for close-up angles of the medina quarter.
- Nejjarine Museum Rooftop Café (5-minute walk): Pay 20 MAD to enter the restored Fondouk Nejjarine wood museum, then head straight to the rooftop terrace for mint tea and unobstructed views over the medina roofs.
- Merenid Tombs & Borj Nord (15-minute taxi ride up the northern hill): At sunset, every green-tiled landmark in Fes el-Bali lights up from above—and the vast rectangular green roof of Al Quaraouiyine is the undeniable anchor right in the center of the valley.

The Al Quaraouiyine Library: Can Tourists Visit in 2027?
Right beside the mosque off Place Seffarine stands the Al Quaraouiyine Library (Khizanat al-Qarawiyyin), formally founded in 1349 by the Marinid Sultan Abu Inan Faris and widely celebrated as the oldest continuously operating library in the world.
Inside its climate-controlled vaults sit roughly 4,000 priceless historical manuscripts, including:
- A 9th-century Quran written in crisp Kufic calligraphy on gazelle/camel parchment.
- A 1207 CE medical diploma—one of the oldest surviving medical degrees in human history.
- Original manuscripts bearing the handwritten notes of Ibn Khaldun (the Muqaddimah) and Ibn Rushd.
Between 2012 and 2016, Moroccan-Canadian architect Aziza Chaouni led a meticulous restoration that stabilized underground canals, built a modern manuscript conservation lab, and restored the soaring painted cedar ceilings—creating an extraordinary historical symmetry: founded by a Muslim woman in 859 AD, and rescued by a Muslim woman more than 1,150 years later.

Honest 2027 Access Reality (Don't Be Misled by Old Articles)
Dozens of viral 2016–2018 news headlines declared "World's Oldest Library Opens to Tourists!" Here is what actually happens on the ground today:
- The Main Reading Room & Manuscript Vault: Strictly reserved for accredited scholars, university researchers, and graduate students holding official written permission from Morocco's Ministry of Culture/Habous. Regular tourists cannot walk into the reading room or browse the shelves.
- The Small Public Exhibition Hall: Access for foreign tourists has remained inconsistent and unpredictable. Some days a guard allows visitors to step into the front vestibule or small exhibit room; other months it stays closed to walk-in tourists entirely.
- Practical Advice: Walk over to the library doorway on Place Seffarine and ask the guard politely if the exhibition hall is open that morning—or ask a licensed Fes guide to verify before you go. Treat getting inside as a lucky bonus, not a guaranteed stop, and never pay a street tout claiming he can "unlock the library for you."
3 Nearby Architectural Masterpieces Open to Non-Muslims
If looking through the gates of Al Quaraouiyine Mosque leaves you wanting to actually step inside 14th-century Moroccan architecture, you are standing in the best 300-meter radius in the country. These three monuments were built to house Al Quaraouiyine's students and scholars—and all three welcome non-Muslims:

| Nearby Landmark | Walk from Al Quaraouiyine | 2027 Entry Fee | Why You Shouldn't Miss It |
|---|---|---|---|
| Al-Attarine Madrasa | 1 minute (right across the spice lane) | 20–30 MAD (~$2–$3) | Built in 1325 by Sultan Abu Sa'id Uthman II as a dormitory for Al Quaraouiyine students. Arguably the single most finely detailed square inch of zellij tilework, lace stucco, and carved cedarwood in Morocco. |
| Seffarine Madrasa | 1 minute (on Place Seffarine) | Exterior / Limited access (Active student housing) | Built in 1271—the oldest Marinid madrasa in Fes—still housing students studying religious sciences at Al Quaraouiyine today. |
| Bou Inania Madrasa | 12–15 minutes (heading west toward Bab Bou Jeloud) | 20–30 MAD (~$2–$3) | The only Fes madrasa that also functioned as a full Friday mosque with its own green-tiled minaret, yet opens its massive marble courtyard to non-Muslims (except the rear prayer hall). |
| Chouara Tannery | 5 minutes (heading east from Place Seffarine) | Free (10–20 MAD terrace tip) | The famous medieval leather-dyeing stone vats—easy to pair right after your Al Quaraouiyine perimeter loop. |
(Heading up to Fes from Marrakech? Compare the 6.5-hour direct train, Ryanair flight, and 3-day Sahara route in our Marrakech to Fes Guide, or check How to Book Trains in Morocco).
Respectful Visiting & Photography Etiquette Around Al Quaraouiyine
Because Al Quaraouiyine Mosque is a living religious sanctuary—not a museum—how you behave outside its gates matters deeply to locals:
- Never Step Across the Threshold: Even if the huge doors of Bab al-Ward are wide open and nobody is standing guard, stay strictly outside the raised stone threshold or wooden barrier (anaza).
- Do Not Block Worshippers: Around the five daily calls to prayer (Adhan)—and especially Friday midday between 12:30 PM and 2:00 PM—step well aside from the doorways so locals can enter and exit smoothly.
- Photography Rules: Taking a quiet, quick photo of the empty marble courtyard through an open doorway between prayers is generally tolerated, provided no worshippers are praying in your frame and you do not use flash or a tripod. Never photograph locals washing for prayer or leaving the mosque without asking. (Review exact Moroccan privacy statutes in our guide on Taking Photos of People in Morocco).
- Dress Modestly: Cover shoulders and knees when walking through the heart of Fes el-Bali. You will feel more comfortable and receive warmer smiles from the traditional booksellers and artisans lining the mosque walls.
Do's and Don'ts: Visiting Al Quaraouiyine Mosque in Fes
| Do | Don't |
|---|---|
| Visit between 9:30 AM and 11:30 AM when gates like Bab al-Ward often stand open between prayers | Try to enter during Friday midday prayers (12:30 PM–2:00 PM) when lanes are tightly packed |
| Circle the entire perimeter—combining Bab al-Ward, Bab al-Hafa, and Place Seffarine | Judge the complex from just one alley door and miss the coppersmiths' square and library facade |
| Step inside Al-Attarine Madrasa (1 minute away) to experience authentic Marinid courtyard architecture up close | Cross the mosque threshold or step onto prayer carpets to "get a better photo" |
| Ask at the Place Seffarine guard desk if the Al Quaraouiyine Library exhibition space is open that day | Pay a street tout promising "special access" inside the mosque or manuscript vault |
| Climb to Nejjarine Museum Rooftop or the Merenid Tombs to see the giant green-tiled roof from above | Take photos of worshippers praying inside the doors or use flash/tripods in the narrow gates |
Frequently Asked Questions (FAQ)
Can tourists enter Al Quaraouiyine Mosque in Fes?
No. Al Quaraouiyine Mosque is an active Islamic place of worship, and non-Muslim visitors are not permitted inside the prayer hall or interior courtyard. However, tourists can walk around all sides of the complex for free, view its ornate bronze Almoravid doors, and peek respectfully into the marble courtyard through open gates such as Bab al-Ward between prayer times.
Is Al Quaraouiyine really the oldest university in the world?
Yes. Both UNESCO and Guinness World Records recognize the University of Al Quaraouiyine—founded in 859 AD by Fatima al-Fihri—as the oldest existing, continuously operating higher educational institution in the world. While it functioned in the traditional Islamic madrasa system before being reorganized as a modern state university in 1963, scholarly instruction at the site has continued uninterrupted for over 1,165 years.
Can non-Muslims visit the Al Quaraouiyine Library in 2027?
Access for general tourists is limited and not guaranteed. Following its major restoration completed in 2016 by architect Aziza Chaouni, the main reading room and 4,000-manuscript vault remain reserved for accredited scholars and researchers. A small front exhibition space occasionally opens to visitors—check locally at the Place Seffarine entrance or ask your licensed Fes guide on the day of your visit.
How do I find Al Quaraouiyine Mosque inside Fes el-Bali without getting lost?
Start at Bab Bou Jeloud (The Blue Gate) and walk straight downhill along Talaa Kebira (the main downhill slope always leads toward the center of the medina!). After about 15–20 minutes, follow the signs for Al-Attarine Madrasa and Place Seffarine—Al Quaraouiyine sits right between them. Use an offline map app like Maps.me or Organic Maps, or hire a licensed Fes guide for your first morning. (Planning your daily costs in Fes? See How Much Money Should I Budget Per Day in Morocco?).
Who was Fatima al-Fihri?
Fatima al-Fihri (Fatima bint Muhammad al-Fihriyya) was a devout, educated 9th-century Arab woman whose wealthy merchant family migrated from Kairouan, Tunisia to Fes. After inheriting her father's fortune, she funded and oversaw the founding of Al Quaraouiyine Mosque in 859 AD, establishing one of the most influential centers of scholarship in Mediterranean and Islamic history.
Official Heritage & Academic Reference Links
Verify historical designations, architectural archives, and official visitor updates through these authoritative portals:
- UNESCO World Heritage Centre – Medina of Fez & Al Quaraouiyine Heritage Listing
- Guinness World Records – Oldest Higher-Learning Institution (University of al-Qarawiyyin)
- Visit Morocco – Official Moroccan National Tourist Office Fes Cultural Guide
- Université Al Quaraouiyine – Official Moroccan State University Portal
(Building out the rest of your northern Morocco loop? Explore our Fes Travel Guide, our Chefchaouen Travel Guide, and our cultural handbook on Morocco Rules for Tourists!)

