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.

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
- Casablanca
The Hassan II Mosque tour, the modern end of the story.
- Rabat
Hassan Tower and the Kasbah of the Udayas, Almohad gates.
- Moulay Idriss and Volubilis
Where the first Moroccan state began, in 788.
- Fes
Al-Qarawiyyin and the madrasas: give it two full days.
- 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
- University of al-Qarawiyyin: founding tradition and its sources (Wikipedia, with references)
- Idrisid dynasty (Wikipedia, with references)
- Almoravid dynasty (Wikipedia, with references)
- Almohad Caliphate (Wikipedia, with references)
- Marinid Sultanate (Wikipedia, with references)
- Saadi Sultanate (Wikipedia, with references)
- Bou Inania Madrasa, Fes (Wikipedia, with references)
- Koutoubia Mosque: history and dates (Wikipedia, with references)
- Hassan Tower, Rabat (Wikipedia, with references)
- Hassan II Mosque, Casablanca (Wikipedia, with references)
- Marrakesh: founding dates (Wikipedia, with references)
- 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.