Al-Qarawiyyin Mosque & University

Al-Qarawiyyin is a working mosque and university in Fez, founded in 859 AD by Fatima al-Fihri and often called the world's oldest existing university. The prayer hall is closed to non-Muslims, but you can view the tiled courtyard through its doorways free of charge. Allow 15–30 minutes; quieter outside prayer times.

Al-Qarawiyyin lies at the spiritual and intellectual heart of Fez. Founded in 859 AD by Fatima al-Fihri, it is frequently described as the oldest existing degree-granting educational institution in the world, and it remains both a great congregational mosque and a centre of Islamic learning more than eleven centuries on.

A thousand years of learning

Fatima al-Fihri, the daughter of a wealthy merchant who had emigrated from Kairouan in Tunisia, devoted her inheritance to building a mosque for her community in 859 AD. From its courtyard grew one of the medieval world's most important seats of scholarship, where theology, law, grammar, astronomy and medicine were taught and debated. Scholars associated with Fez and its circles over the centuries helped transmit knowledge between the Islamic world and Europe. The complex was repeatedly enlarged by successive dynasties, and at its height it ranked among the leading universities of its age. Its historic library, recently restored and reopened, safeguards thousands of manuscripts, including some of the oldest and rarest in the Muslim world. The institution endures today as part of Morocco's national university system.

Seeing it as a visitor

Al-Qarawiyyin is a functioning mosque, and like other working mosques in Morocco its prayer hall is closed to non-Muslims. This does not mean it is off-limits to travellers. From the surrounding lanes you can catch tantalising glimpses through the great horseshoe-arched doorways into the courtyard, with its zellij tilework, carved plaster and twin pavilion fountains. The mosque is so deeply woven into the fabric of the medina that you will pass its many gates simply by wandering Fes el-Bali. A knowledgeable guide can point out the best vantage points and explain what you are seeing. The neighbourhood around it — particularly the nearby Attarine and Cherratine medersas, which are open to all — lets you appreciate the same craftsmanship at close range.

The library and its manuscripts

Behind the mosque stands one of the world's oldest working libraries, founded in the fourteenth century by the Marinid sultan Abu Inan Faris. After years of decline it was carefully restored under the Canadian-Moroccan architect Aziza Chaouni and reopened in the last decade, with new climate controls protecting collections that had suffered from damp and neglect. Its holdings run to thousands of manuscripts, among them an early account of Maliki jurisprudence and a celebrated copy of Ibn Khaldun's work, alongside texts on medicine, astronomy and theology. The reading rooms and conservation areas serve scholars rather than passing visitors, so general access is limited and arrangements vary; treat any opening as a privilege rather than an expectation. Even from outside, knowing that these manuscripts sit a few metres beyond the walls changes how the place feels. Ask your guide whether any part is currently accessible, and confirm locally before counting on entry.

Fitting it into a medina walk

Al-Qarawiyyin sits at the centre of Fes el-Bali, so the most rewarding approach is to weave it into a wider half-day on foot rather than treat it as a single stop. A natural loop links the mosque's gates with the Attarine and Cherratine medersas, the coppersmiths' clamour of Seffarine Square, and the Chouara tanneries a short walk downhill. Mornings tend to be calmer, before the lanes fill with handcarts and the midday crowds; allow time to lose your bearings, as the alleys around the mosque are among the densest in the medina. Wear shoes you can walk in for hours and carry water. If you are navigating without a guide, note landmarks rather than street names, since signage is sparse. Pausing at a rooftop café nearby gives you the only real overhead view of the green-tiled roofs you cannot otherwise see from the lanes.

Planning your visit to Al-Qarawiyyin Mosque & University

  • Best time: Outside prayer times, when the lanes are quieter and the doorways less busy.
  • Cost: Free; note the prayer hall is closed to non-Muslims, so you view it from the doorways.
  • Time needed: 15–30 minutes around the exterior and gates.
  • Tip: Visit the nearby Attarine Medersa, open to all, for the same calibre of zellij and carved cedar at close quarters.

Can non-Muslims go inside Al-Qarawiyyin?

No. As an active mosque, its prayer hall is reserved for Muslim worshippers, in keeping with the convention for working mosques across Morocco. Non-Muslim visitors can still admire the courtyard and tilework through the open doorways from the surrounding lanes.

Is it really the world's oldest university?

It is widely cited as the oldest existing degree-granting institution still in operation, founded in 859 AD by Fatima al-Fihri. Some institutions are older as schools, but Al-Qarawiyyin's continuous status as a degree-awarding university gives it this distinction.

Can visitors see inside the Al-Qarawiyyin library?

The restored library primarily serves researchers and conservation staff, so it is not a standard tourist attraction with regular public hours. Access for general visitors is limited and varies, so ask your guide and confirm locally rather than assuming you can walk in.

What else should I see near Al-Qarawiyyin?

The Attarine and Cherratine medersas sit close by and are open to all, showing the same zellij and carved cedar at close range. Seffarine Square with its metalworkers and the Chouara tanneries are both a short walk away, making a natural on-foot circuit through Fes el-Bali.

Nearby places

Experiences near Al-Qarawiyyin Mosque & University