Fes · Fes el-Bali, the centre of the old city

Al-Qarawiyyin

Mosque · No ticket · A few minutes at each gate as part of a walk

The bronze-plated door of Bab al-Ward, the north gate of the Qarawiyyin Mosque in Fes, open onto a white arch with the courtyard beyond

Al-Qarawiyyin at a glance

What it is
Mosque in Fes
Entry
No ticket
Hours
Check locally; they change in Ramadan
Allow
A few minutes at each gate as part of a walk; it is seen from the lanes, not visited inside.
Built
Founded as a mosque by Fatima al-Fihri in 857 or 859, according to the chronicle Rawd al-Qirtas; enlarged in 956, in 1134 to 1143 under the Almoravid ruler Ali ibn Yusuf, and embellished by later dynasties.
UNESCO
Inside the Medina of Fez, inscribed on the World Heritage List in 1981.
When to go
Outside prayer times, when the gates stand open and you are not in the way of worshippers.
From the centre
Walk Talaa Kebira to its end at the Attarine Madrasa and turn right: the lane runs along the mosque's walls past its gates and down to Place Seffarine.
Dress
Shoulders and knees covered in the lanes around the mosque, as everywhere in Fes el-Bali.
Access
The lanes around the mosque are level by Fes standards; the view through Bab al-Ward needs no steps.

Fatima al-Fihri, a merchant's daughter, founded al-Qarawiyyin as a mosque in 857 or 859; her family had come to Fes from Kairouan. It grew into the main mosque of the city and its centre of Islamic learning, and since 1963 it has been part of Morocco's state university system. The mosque is closed to non-Muslims; visitors see its courtyard through the open gates.

In short

Al-Qarawiyyin is the great mosque and university at the centre of Fes el-Bali, founded in 857 or 859 by Fatima al-Fihri. Non-Muslims cannot enter the mosque, but from Bab al-Ward on the north side you can look across the tiled courtyard to the carved wooden screen of the prayer hall. There is no ticket.

The visit, stop by stop

Al-Qarawiyyin in the order you walk it

  1. Bab al-Ward, the north gate

    The main gate into the courtyard is Bab al-Ward, beside the Attarine Madrasa. Its doors are wood faced with bronze from the Almoravid period; they keep original pieces and were restored between 2005 and 2007. The vestibule behind is covered by a white Marinid dome, fluted outside and carved inside.

  2. The view across the courtyard

    From outside Bab al-Ward you look straight across the courtyard: a floor of zellij with a fountain at its centre and, opposite, the central entrance to the prayer hall behind a carved and painted wooden screen called the anaza, which serves as an outdoor mihrab for prayers in the courtyard.

  3. Bab al-Hafa and its water channel

    Just west of Bab al-Ward is Bab al-Hafa, the Gate of the Barefooted, from the Almohad era. A small channel of water crosses the floor inside it so that worshippers could wash their feet as they came in.

  4. The minaret from the lanes

    The minaret overlooks the courtyard from the west. It was built in the 10th century with the support of the Umayyad caliph of Cordoba, Abd al-Rahman III, and with the minaret of the Andalusians' Mosque it is the oldest preserved minaret in Morocco. The Marinids whitewashed it in the 13th century to protect its soft limestone.

  5. The library door on Place Seffarine

    On the south side, facing Place Seffarine and its coppersmiths, is the entrance to the library under a green-tiled wooden canopy. This entrance, built outside the mosque in the 1940s, is what made the library accessible to non-Muslims.

    The horseshoe-arched entrance to the Qarawiyyin library on Place Seffarine in Fes, under a green-tiled wooden canopy, with people in the square

Photos in this section: Robert Prazeres (CC BY-SA 4.0), via Wikimedia Commons (photo credits).

Its founding and its founder

The Rawd al-Qirtas, a chronicle by Ibn Abi Zar, says Fatima al-Fihri founded the mosque in 857 or 859. She was the daughter of Mohammed al-Fihri, a wealthy merchant whose family had moved from Kairouan, in present-day Tunisia, to Fes early in the 9th century and settled among other Kairouan families in a western district of the city. The name Qarawiyyin means the people of Kairouan.

From a neighbourhood mosque to the city's great mosque

The first building measured about 36 by 32 metres, with four aisles. It was enlarged on three sides in 956, when the Umayyad caliph of Cordoba paid for the work, and again between 1134 and 1143, when the Almoravid ruler Ali ibn Yusuf added three more aisles to reach ten. Later dynasties added the bronze doors, the courtyard pavilions and the library rooms, so the building you walk around today holds work from more than a thousand years. Tradition made the Qarawiyyin's call to prayer the one by which the other mosques of Fes set theirs.

Mosque and university: one place, two roles

Teaching grew up inside the mosque. Historians disagree on when it began: Abdelhadi Tazi gives 1121 as the earliest clear evidence, Mohammed al-Manouni places it under the Almoravids, and Évariste Lévi-Provençal under the Marinids. The Marinids then built colleges around the mosque, the Saffarin in 1271, the Attarine in 1323 and the Mesbahiyya in 1346, to lodge its students. Scholars connected with the Qarawiyyin as students or teachers include Ibn Khaldun, Ibn al-Khatib and Leo Africanus.

The "oldest university" claim, and who makes it

UNESCO's entry for the Medina of Fez has described the Qarawiyyin as the oldest university in the world, and Guinness World Records lists it as the oldest existing, continually operating educational institution. Many historians draw a line between a madrasa and a university, and date the Qarawiyyin's change into a university to its reorganisation in 1963. We give the claim with its sources and leave the debate to them.

Who studies here now

Teaching concentrates on the Islamic religious and legal sciences, with strengths in classical Arabic grammar and Maliki law, and is still delivered in traditional ways. Students come from across Morocco and from Muslim West Africa. Women were first admitted in the 1940s.

What visitors can see

The prayer hall and the courtyard are for Muslims. Non-Muslim visitors see the mosque from its gates, and there is nothing to pay. Stand to one side of the doorway, do not step over the threshold, and do not photograph people at prayer; at prayer times, move on and come back later. Opening of the gates follows the prayer day, so check locally.

Through the doors to the courtyard

Bab al-Ward, the north gate, gives the clearest view: through it you see the courtyard, the central fountain and the anaza screen in front of the prayer hall, whose doorway is framed in carved and painted stucco. The Saadian pavilions at either end of the courtyard are visible from the gates on those sides. A guide helps here, because the gates are spread round a building that is surrounded by houses and shops, with no open space to step back into.

The library and its restoration

Sultan Abu Inan founded the library in 1349. Its present building dates mainly from an expansion begun in 1940 under King Mohammed V and opened in 1949, with a reading room 23 metres long under a painted wooden ceiling and the separate entrance on Place Seffarine. It holds manuscripts that include volumes of the Muwatta of Malik on gazelle parchment, a 9th-century Quran and the copy of Ibn Khaldun's Kitab al-Ibar that he gave in 1396. A restoration led by the architect Aziza Chaouni was due to finish in 2016 or 2017. Whether visitors can enter the reading room on a given day is not published, so check locally.

The streets around it

The Qarawiyyin sits inside a ring of markets. To the north-west, Talaa Kebira ends at the Attarine Madrasa and the roofed spice market. To the south, the library door opens onto Place Seffarine, where coppersmiths have kept workshops since at least the 16th century and the Saffarin Madrasa of 1271 opens its door. Beyond it the lanes drop towards the Bou Khrareb river and the Chouara tannery on its bank. Just west is the shrine of Moulay Idris II, whose sanctuary was historically closed to non-Muslims and pack animals; its edge is marked by a carved gateway.

That makes the mosque the turning point of most guided walks in Fes el-Bali: down Talaa Kebira in the morning, round the Qarawiyyin's gates at midday, then out to the crafts quarters and the tanneries in the afternoon.

Look closer

What to notice inside the Al-Qarawiyyin

  1. Eighteen ways in

    By one count the mosque has 18 gates and entrances round its walls, from small square doorways to huge horseshoe arches roofed over the street.

  2. Bronze on the doors

    Several gates keep Almoravid bronze fittings, among the oldest bronze work in Moroccan architecture; the doors of Bab al-Gnaiz and Bab Sbitriyyin are 1950s replicas, with fragments of the originals at the Dar Batha Museum.

  3. The Saadian pavilions

    At the east and west ends of the courtyard stand two pavilions with pyramid roofs, each over a fountain, added in 1587 to 1588 and in 1609 on the model of the Court of the Lions in the Alhambra.

  4. The Tower of the Trumpeters

    Next to the mosque stands the Borj Neffara, an observation tower that people take for a minaret; it belonged to a timekeeper's house.

Walk on

Pair the Al-Qarawiyyin with these, in this order

  1. 1

    Al-Qarawiyyin

    You are here. Start at opening time.

  2. 2

    Al-Attarine Madrasa

    The Marinid college beside Bab al-Ward was built to lodge Qarawiyyin students, and you can go inside.

  3. 3

    Nejjarine Museum

    The carpenters' square and its museum of woodwork are a few lanes west, off the end of Talaa Kebira.

  4. 4

    Shopping in Fes

    Place Seffarine, at the library door, is the coppersmiths' square, and the lanes beyond lead down to the Chouara tannery.

Street-scale map: the Al-Qarawiyyin and the sights to pair with it, numbered in walking order 1 Al-Qarawiyyin 2 Al-Attarine Madrasa 250 m
Straight-line positions from Wikidata coordinates; lanes in the medina bend, so follow the order, not the line. Inset: Fes on the whole map of Morocco.

More in Fes, and routes through it

Sources, dates checked and photo credits

Sources

  1. Wikipedia, University of al-Qarawiyyin checked 3 Dec 2026
  2. Wikipedia, Fes el Bali checked 3 Dec 2026
  3. Wikidata checked 3 Dec 2026

Drive times come from our route planner, door to door by private car without stops. Each source shows the date we last checked the facts on this page against it.

Photos: The bronze-plated door of Bab al-Ward: Ideophagous, CC BY-SA 4.0; The horseshoe-arched entrance to the Qarawiyyin library on Place Seffarine in Fes: Robert Prazeres, CC BY-SA 4.0, via Wikimedia Commons (photo credits).

Questions

Al-Qarawiyyin: questions before you go

Can non-Muslims go inside the Qarawiyyin Mosque?
No. The prayer hall and courtyard are for Muslims. Visitors look in from the gates, and Bab al-Ward on the north side gives the clearest view of the courtyard and fountain.
Who founded al-Qarawiyyin?
Fatima al-Fihri, the daughter of a merchant from Kairouan, founded it as a mosque in 857 or 859, according to the Rawd al-Qirtas chronicle.
Is al-Qarawiyyin the oldest university in the world?
UNESCO and Guinness World Records have described it as the oldest university or oldest continually operating educational institution. Many historians date its change from a madrasa into a university to 1963.
Can tourists visit the Qarawiyyin library?
The library has its own entrance on Place Seffarine, built in the 1940s so that non-Muslims could reach it. Visiting arrangements are not published, so ask locally on the day.

Ask for a quote

See the Qarawiyyin quarter with a guide

Tell us your dates and who is travelling. We plan the route, give your guided Fes day its midday round the Qarawiyyin's gates and the Attarine, and send one quote.

Your trip
Where should we reply?

Free, no obligation. A planner replies within one working day, usually sooner.

What happens next

  1. Send your dates and your group.A month, a rough route and a head count are enough to start.
  2. Get a day-by-day plan and one quote.Drive times, where you sleep, the vehicle and what is included, for your group only.
  3. Change it, or confirm it.Nothing is booked or charged until you say yes.
  • A planner on our US desk or our team in Morocco writes back, depending on the hour you send.
  • If your number is on WhatsApp, the reply comes there. If not, by phone or email.
  • Your details go only to the operator named at the foot of this page.
Get a quote WhatsApp