wakha

Morocco, layer by layer

Arab-Islamic Morocco: twelve centuries of mosques, madrasas and cities

Most of what you see in a medina, the mosques, the colleges, the fountains, the gates, was built by dynasties that were Muslim, and often Amazigh, from the 8th century on.

Arab armies reached Morocco in the late 7th century and Islam spread among the Amazigh in the decades after. In 788 Idris I founded the first Moroccan Muslim state, and his son Idris II built Fes. Almoravids, Almohads, Marinids, Saadians and Alaouites followed, each leaving their cities and monuments.

Al-Qarawiyyin in Fes is a mosque and one of the oldest centres of learning in the world still teaching. By tradition it was founded in 859 by Fatima al-Fihri, a woman from Kairouan. That date and story come from a chronicle written five centuries later, which historians treat with caution; some see the story as a pious legend, and an inscription points to work under an Idrisid prince around 877. What is sure is a 9th-century mosque that became a great centre of learning, and a university in the modern sense much later. Guinness World Records calls it the oldest existing, continually operating educational institution. The mosque is closed to non-Muslims, but its doors and courtyard can be glimpsed from the lanes.

The madrasas were the colleges where students lived and learned: Bou Inania (1350s) and al-Attarine in Fes, Ben Youssef in Marrakech. Their courtyards, cedar, carved plaster and zellige are open to visitors and are the best place to see this art up close.

The Koutoubia minaret in Marrakech (Almohad, completed by about 1195, probably under Yaqub al-Mansur) set the pattern for the Giralda of Seville and the Hassan Tower in Rabat. The Hassan II Mosque in Casablanca, finished in 1993 on the edge of the Atlantic, is the best-known mosque in Morocco open to non-Muslim visitors, on guided tours outside prayer times; most mosques are for Muslims only.

Zellige builds whole walls from one idea: a star of eight points, the two squares of the khatem, repeated without end. Craftsmen in Fes still cut each piece by hand from glazed tile. Drawn by Wakha.
Watercolour of the Koutoubia mosque and minaret in Marrakech
The Koutoubia, Marrakech, painted by Hercules Brabazon Brabazon in the 19th century. CC0, via Wikimedia Commons.

Where to see it today

  • Al-QarawiyyinFes medina

    Closed to non-Muslims; you can look into the courtyard from its doorways in the lanes around it.

  • Bou Inania and al-Attarine madrasasFes medina

    Open to visitors, except the prayer hall; the finest Marinid carving in the country.

  • Moulay Idriss ZerhounNear Meknes

    The town of Idris I's tomb, on two hills; the shrine itself is for Muslims only.

  • Koutoubia and Ben Youssef MadrasaMarrakech

    The minaret is the city's landmark; the madrasa is open to visitors.

  • Hassan Tower and Mausoleum of Mohammed VRabat

    The unfinished Almohad minaret faces the royal mausoleum.

  • Hassan II MosqueCasablanca

    Guided tours for non-Muslims outside prayer times; dress covering shoulders and knees.

Opening hours and tickets change; we list them only where an official source states them. Ask at your riad the day before.

One route that strings it together

  1. Casablanca

    The Hassan II Mosque tour, the modern end of the story.

  2. Rabat

    Hassan Tower and the Kasbah of the Udayas, Almohad gates.

  3. Moulay Idriss and Volubilis

    Where the first Moroccan state began, in 788.

  4. Fes

    Al-Qarawiyyin and the madrasas: give it two full days.

  5. Marrakech

    The Koutoubia, Ben Youssef and the Saadian Tombs.

What visitors say

  • A travel guide says the inside of the Hassan II Mosque is what makes the visit: book the tour ahead, cover shoulders and knees, and expect a ticket priced for tourists. Passaporte no Bolso
Sources, checked 2026-11-14
  1. University of al-Qarawiyyin: founding tradition and its sources (Wikipedia, with references)
  2. Idrisid dynasty (Wikipedia, with references)
  3. Almoravid dynasty (Wikipedia, with references)
  4. Almohad Caliphate (Wikipedia, with references)
  5. Marinid Sultanate (Wikipedia, with references)
  6. Saadi Sultanate (Wikipedia, with references)
  7. Bou Inania Madrasa, Fes (Wikipedia, with references)
  8. Koutoubia Mosque: history and dates (Wikipedia, with references)
  9. Hassan Tower, Rabat (Wikipedia, with references)
  10. Hassan II Mosque, Casablanca (Wikipedia, with references)
  11. Marrakesh: founding dates (Wikipedia, with references)
  12. UNESCO, Medina of Fez

The other layers

Say yes to the trip

Tell us your email and we'll write when the Wakha app is ready: offline, every city, every answer.