Ben Youssef Madrasa

Step through the entrance corridor of the Ben Youssef Madrasa and the noise of the Marrakech souks disappears. In front of you opens a long marble courtyard with a rectangular pool reflecting walls of zellige, carved stucco and cedar wood. It is one of the most photographed interiors in Morocco, and one of the finest examples of Saadian architecture in the country. For centuries, this was where students lived and studied the Quran and Islamic sciences in the heart of the medina.

This guide covers the history of the Ben Youssef Madrasa, what to see inside, how to visit, the best time to go for photos, and what to see nearby in the northern medina of Marrakech.

DetailInformation
LocationNorthern medina of Marrakech, near the Ben Youssef Mosque and the Marrakech Museum
Founded14th century, under the Marinids
Rebuilt16th century, under the Saadian dynasty
FunctionQuranic school and student residence
SizeOften described as the largest madrasa in Morocco
Visit timeAbout 45 minutes to 1 hour

A madrasa is a school for religious and legal studies. The first madrasa on this site was founded in the 14th century under the Marinid dynasty, next to the Ben Youssef Mosque, named after the Almoravid sultan Ali ibn Youssef. In the 16th century, the Saadian sultan Abdallah al-Ghalib rebuilt and greatly enlarged it, giving it the form and decoration we see today.

The madrasa was a major center of learning in Marrakech for centuries, with dozens of small rooms for students arranged around inner courtyards. It stopped functioning as a school in the 20th century and later opened to visitors. After a long restoration, it reopened to the public with its decoration carefully preserved.

The main courtyard

The heart of the madrasa is a large rectangular courtyard paved with marble, with a long pool in the center. On each side, walls rise in layers of decoration: zellige tiles at the base, carved stucco in the middle and carved cedar wood above. The reflections in the pool create the famous symmetrical photos.

The prayer hall

At the far end of the courtyard is the prayer hall, with a richly carved mihrab, stucco muqarnas and a dome. Visitors can admire its decoration.

Student rooms

Upstairs, small rooms around smaller courtyards once housed students. Their windows overlook the courtyards, and the contrast between the tiny, simple rooms and the grand decoration below is striking. Climbing up gives beautiful views down into the main courtyard.

The entrance and decoration

The entrance corridor, the carved cedar doors and the intricate inscriptions in Arabic calligraphy are all worth slowing down for. Look closely at the stucco: the patterns combine geometry, floral motifs and religious texts.

  • Location: in the northern medina, about a 10 to 15 minute walk from Jemaa el-Fna, near the Marrakech Museum and the Almoravid Koubba.
  • Tickets: there is an entrance fee, paid at the door. Prices can change, so check on arrival.
  • Opening: generally open daily, with hours that can change during Ramadan and holidays.
  • Dress: modest clothing is respectful, as it is a religious building.
  • Photography: allowed and very popular.
  • Time needed: about 45 minutes to 1 hour.

Come right at opening time to enjoy the courtyard before the crowds. The light is soft in the morning, and the pool reflections are clearest when few people are around. Late afternoon can also be beautiful, but busier.

The northern medina has several sights within a few minutes’ walk:

  • The Almoravid Koubba (Koubba Ba’adiyn), one of the oldest monuments in Marrakech, from the 12th century.
  • The Marrakech Museum, in the 19th century Dar Mnebhi palace.
  • The Ben Youssef Mosque, closed to non-Muslims.
  • The souks: dyers’ souk, metalworkers, leather and more. See our guide to the best souks in Marrakech.
  • Le Jardin Secret, a restored riad garden.

For a full list, see Marrakech attractions and what to see in Marrakech.

If you also visit Fes, compare it with the Bou Inania Madrasa. Bou Inania is older, from the 14th century Marinid period, and also functions as a mosque. Ben Youssef is larger and reflects the Saadian style, with its long reflecting pool. Both are among the finest examples of Moroccan craftsmanship.

  • Go early or late to avoid crowds.
  • Climb to the upper floor for the best view of the courtyard.
  • Hire a licensed guide to learn the meaning of the inscriptions and patterns.
  • Combine the visit with the Saadian Tombs and El Badi Palace for a Saadian-themed day. See our guides to the Saadian Tombs and El Badi Palace.
  • Watch your step on polished marble floors.

The Ben Youssef Madrasa is one of the most beautiful buildings in Marrakech and a perfect introduction to Moroccan architecture. Arrive early, stand by the pool, look up at the cedar, then climb to the student rooms and imagine life here centuries ago. It is a quiet, inspiring break from the souks. Our Marrakech tours and Morocco custom tours include guided medina visits.

What is the Ben Youssef Madrasa?

It is a historic Quranic school in the Marrakech medina, rebuilt in the 16th century by the Saadians, and often described as the largest madrasa in Morocco.

When was the Ben Youssef Madrasa built?

It was founded in the 14th century and rebuilt and enlarged in the 16th century under the Saadian sultan Abdallah al-Ghalib.

Can tourists visit the Ben Youssef Madrasa?

Yes. It is open to visitors of all faiths, with an entrance fee.

How long does a visit take?

About 45 minutes to 1 hour.

What is the best time to visit?

Early in the morning, right at opening, for fewer crowds and the best photos.

Where is the Ben Youssef Madrasa?

In the northern part of the Marrakech medina, about 10 to 15 minutes’ walk from Jemaa el-Fna.

Tours from Marrakech: Cross the High Atlas to Ait Ben Haddou and the dunes of Erg Chebbi.

Morocco Desert Tours: Camel trekking and a night under the stars in a Sahara desert camp.

Tours from Fes: The oldest medina in Morocco, then the Middle Atlas and the desert.

Tours from Casablanca: Begin at the Hassan II Mosque and travel through the imperial cities.

Tours from Tangier: Start in the north with Chefchaouen and the Rif Mountains.

Tours from Ouarzazate: Kasbahs, film studios and the gorges of the south.

Name
Lahcen Saadi, a professional local guide from the Exploring Morocco Trips team, in traditional attire in front of a 4x4 in the Sahara dunes

Your Local Experts

Our Moroccan team organizes private tours from every major city in Morocco: Marrakech, Fes, Casablanca, Tangier, Rabat, Agadir, Ouarzazate and more. Wherever you land, we pick you up and design your trip around your dates and interests.

Scroll to Top