Ben Youssef Madrasa, Marrakech: History, Architecture and How to Visit

In this Journal Entry

The Ben Youssef Madrasa is a 16th-century Islamic college in the old medina of Marrakech, and one of the finest buildings in Morocco. The Saadian sultan Abdallah al-Ghalib completed it in 1564–65, on a site first used for a madrasa under the Marinids. Today it is a historic monument where you can walk through carved cedar, stucco and tilework, then peek into the small rooms where students once lived.

When was the Ben Youssef Madrasa built?

The building you see today is Saadian. It was completed in 1564–1565 CE (972 AH), a date recorded by an inscription. Its builder was Sultan Abdullah Al-Ghaleb Assaadi, better known as Abdallah al-Ghalib.

The site itself is older. The first madrasa here was founded by the Marinid sultan Abu al-Hasan, who reigned from 1331 to 1348. The Saadians later replaced it with a much larger complex.

This mix of dynasties is easiest to grasp on foot. A guided medina and souks walking tour helps you see how the old northern quarter grew around its mosque, its schools and its markets.

Why is it called Ben Youssef?

The madrasa takes its name from its neighbour, the Ben Youssef Mosque. This mosque was originally the main mosque of the city. It was founded by the Almoravid sultan Ali ibn Yusuf, who ruled from 1106 to 1142.

So the name is centuries older than the college. The mosque standing today is not the Almoravid original, though. The current building dates from a reconstruction completed in 1819–20 under the Alaouite sultan Suleiman.

Abdallah al-Ghalib placed his new madrasa just east of the mosque. That gave the old prayer hall fresh life as the mosque of the city’s scholars. A short walk south stands the Almoravid Qubba, a domed pavilion also built by Ali ibn Yusuf.

What was life like for its students?

Life here was simple, even if the setting was grand. The official website counts 134 rooms that once housed students. Scholarly sources give about 130 rooms and up to 800 students.

The rooms sit on two levels. Some open onto the main courtyard, while others cluster around six small inner courtyards, three in the northeast wing and three in the southwest wing. From the upper floor, small windows look down onto the main courtyard and its galleries.

Walk the upstairs corridors and you will notice the contrast. The rooms are small and plain, while the shared spaces below are covered in ornament.

The finished madrasa is described as the largest in the Maghreb, and the largest in Morocco. For students, it was a place to live, pray and study in one building, beside what was once the city’s main mosque.

What should you look for in the courtyard?

The courtyard is the heart of the visit. In the centre lies a shallow reflecting pool, measuring about 3 by 7 metres. Galleries run along the east and west sides, with student rooms above them.

Look at the walls from bottom to top. The decoration follows a clear order: zellij tilework along the lower walls, calligraphic friezes around eye level, carved stucco across the middle and upper walls, and then carved wood. Under the gallery arches, stucco brackets support carved wooden lintels between the piers.

Save some attention for the entrance too. Look for a muqarnas vault over the street door, bronze-plated doors with an interlacing geometric pattern, and a carved cedar lintel whose inscription praises Sultan Abdallah as the builder. If you want to understand these techniques before you go, our Moroccan architecture guide explains zellij, stucco and carved cedar in plain terms.

What is inside the prayer hall?

At the southeastern end of the courtyard is the prayer hall. Its mihrab, the niche that shows the direction of prayer, has especially rich stucco decoration. It has a muqarnas dome above it, carved in a honeycomb-like pattern, and a large Kufic inscription around the arch.

The hall also holds one of the oldest objects in the building. It is a marble basin carved in al-Andalus between 1002 and 1007 and dedicated to ‘Abd al-Malik. That is more than five centuries before the madrasa was built.

The basin was first brought to Marrakech by Ali ibn Yusuf, who reused marble from the ruined palaces of Córdoba in the mosque he built in the 12th century. Experts first noted it in 1923. Today it is on display in the madrasa’s prayer hall, so do not rush past it.

What happened to the madrasa after the Saadians?

The Saadian dynasty ended in 1659, and the madrasa carried on as a school for centuries. It closed in 1960. The building was then refurbished and reopened to the public as a historic site in 1982.

In 1985, UNESCO inscribed the Medina of Marrakesh on the World Heritage List, and its listing names the Ben Youssef Madrasa among the city’s monuments. The latest restoration followed royal directives given during King Mohammed VI’s visit to the old medina on 9 January 2017. It was carried out by the Ministry of Habous and Islamic Affairs, which also runs the site.

The madrasa closed for this restoration in November 2018 and reopened in April 2022.

Date Event
1106–1142 Reign of Ali ibn Yusuf, Almoravid founder of the Ben Youssef Mosque
1331–1348 Reign of Marinid sultan Abu al-Hasan, founder of the first madrasa on the site
1564–1565 Current madrasa completed under the Saadian sultan Abdallah al-Ghalib
1659 End of the Saadian dynasty
1819–1820 Ben Youssef Mosque rebuilt under the Alaouite sultan Suleiman
1960 Madrasa closes as a school
1982 Reopens to the public as a historic site
1985 Medina of Marrakesh inscribed as a UNESCO World Heritage Site
November 2018 Closes for restoration
April 2022 Reopens to visitors

Can you visit the Ben Youssef Madrasa today?

Yes. The official website lists opening hours of 9:00 AM to 7:00 PM every day. It gives standard entry as 50 DH, with 10 DH for children under 12 and 30 DH per person for groups of more than 20.

During Ramadan, the official website lists shorter opening hours, from 9:00 AM to 4:30 PM every day. A visit to the Ben Youssef Madrasa usually takes about an hour, enough for the courtyard, the prayer hall and the student rooms upstairs.

When we checked, the official site said its online ticketing system was under maintenance and tickets were sold only at the entrance. It also mentions an audio guide. Details like these can change, so check the official website shortly before your visit.

The madrasa’s address is Rue Assouel, in the northern part of the medina. The lanes in this quarter twist and turn, so allow extra time if you are walking from Jemaa el-Fna on your own.

On foot, the madrasa is about 1 km north of Jemaa el-Fna, a walk of 10 to 15 minutes through the souks.

How should you plan your visit?

A little planning makes the visit calmer and more rewarding. Here is the order we suggest:

  1. Check the official website for current hours and ticket rules before you set out.
  2. Arrive close to opening time, before the courtyard fills up.
  3. Start in the courtyard and read the walls from tiles to cedar.
  4. Visit the prayer hall to see the mihrab and the Andalusi marble basin.
  5. Climb to the upper floor to explore the student rooms and small courtyards.
  6. Finish at the Almoravid Qubba or the nearby craft lanes.

Here is a tip from our Marrakech-based team. Carry small dirham notes, since tickets are sold at the door, and go upstairs first if a tour group arrives in the courtyard. By the time you come down, the pool is often clear again for photos.

What else is nearby?

The madrasa sits in one of the oldest parts of the medina. The Ben Youssef Mosque stands right beside it. The Almoravid Qubba lies about 40 metres south of the mosque. It dates to either 1117 or, more likely, 1125.

The Marrakech Museum is also in the old centre. It occupies the Dar Mnebhi Palace, built at the beginning of the 20th century and converted into a museum in 1997.

The lanes around the madrasa are a good place to watch local crafts in progress. If you want to see carvers, metalworkers and leather makers at work, our page on artisan workshops in Marrakech is a good next read.

The Ben Youssef Madrasa rewards slow looking, and it fits easily into a day in the medina. To plan the rest of your time in the city, browse all our activities in Marrakech, or ask us anything — we answer for free, with no obligation.

Sources and further reading

Frequently asked questions

Who built the Ben Youssef Madrasa?

The current building was commissioned by the Saadian sultan Abdallah al-Ghalib and completed in 1564–1565. An earlier madrasa on the same site was founded by the Marinid sultan Abu al-Hasan, who reigned from 1331 to 1348.

The name comes from the neighbouring Ben Youssef Mosque, founded by the Almoravid sultan Ali ibn Yusuf. He ruled from 1106 to 1142, long before the college existed.

Is the Ben Youssef Madrasa open after its restoration?

Yes. It closed for restoration in November 2018 and reopened in April 2022. The official website lists daily opening hours of 9:00 AM to 7:00 PM.

The restoration was carried out by the Ministry of Habous and Islamic Affairs, which manages the site. Practical details can change, so it is worth checking the official website a day or two before you go.

How many rooms does the madrasa have?

Sources differ slightly. The official website counts 134 rooms that once housed students. Scholarly sources give about 130 rooms and a capacity of up to 800 students.

The rooms are spread over two floors, around the main courtyard and six smaller inner courtyards. Many visitors are surprised by how small and plain they are compared with the decorated courtyard below.

Is the Ben Youssef Madrasa still a school?

No. The madrasa closed as a school in 1960. The building was then refurbished and reopened to the public as a historic site in 1982.

Today it works as a monument and visitor attraction run by the Ministry of Habous and Islamic Affairs. The Ben Youssef Mosque next door is a separate building.

Is the madrasa part of a UNESCO World Heritage Site?

Yes, as part of the wider medina. UNESCO inscribed the Medina of Marrakesh on the World Heritage List in 1985.

UNESCO’s listing describes the city as founded in 1070–72 by the Almoravids, and it names the Ben Youssef Madrasa among the monuments added in later centuries. The madrasa is not listed on its own, but it is protected as part of the historic city.

What is the most important object to see inside?

Do not miss the marble basin in the prayer hall. It was carved in al-Andalus between 1002 and 1007 and dedicated to ‘Abd al-Malik.

It was later brought to Marrakech by the Almoravid sultan Ali ibn Yusuf for the mosque he built in the 12th century. That makes it centuries older than the madrasa that now displays it.

Tags
Share the story

Stay Inspired

Receive curated travel inspiration and exclusive early access to new private routes.

Your Email Address

Concierge Services

📍
Guided Tours

Multilingual private historians for an immersive experience.

🏠

Luxury Riads

Handpicked heritage boutiques for ultimate serenity.

🚗

Private Transfers

Climate-controlled luxury fleets with dedicated chauffeurs.

Need Help Planning?

Our concierge team is available 24/7 to help craft your bespoke Moroccan escape.

Carved cedar, stucco and zellige around the courtyard of the Ben Youssef Madrasa in Marrakech

Written By

Moratra Team

Our collective of travel designers and local historians spent over a decade mapping the most exclusive corners of the Maghreb to ensure every Moratra journey is a masterpiece of culture and comfort.

★Start Your Adventure

Ready to Discover Morocco?

Let us create a personalized itinerary that brings the best of Morocco to life. From imperial cities to desert camps, every detail is taken care of.