Skip to content
Ben Youssef Madrasa Mistakes to avoid

History of the Ben Youssef Madrasa, from 1564 to Today

A Marinid foundation, a Saadian masterpiece, four hundred years of students and two restorations. The short version.

Book this visit

Some links are affiliate links: if you book, we may earn a commission at no extra cost to you. How this works

Sorted by price, lowest first. Prices from the booking platform; the price at checkout is the one that counts.

A band of carved Arabic calligraphy in stucco above zellij at the Ben Youssef Madrasa

The Ben Youssef Madrasa you visit was built by the Saadian sultan Abdallah al-Ghalib in 1564–1565 (official history page). It replaced an earlier madrasa founded on the site by the Marinid sultan Abu al-Hasan (r. 1331–1348), and for four centuries it housed students of religious sciences, philosophy, medicine and mathematics.

In short

  • 14th century: first madrasa on the site, under the Marinid sultan Abu al-Hasan (r. 1331–1348).
  • 1564–1565: present building, under the Saadian sultan Abdallah al-Ghalib.
  • 1960: closed as a school. 1982: opened as a monument.
  • November 2018 to April 2022: closed for restoration, then reopened.

Timeline at a glance

  1. 1002–1007

    A basin carved in Al-Andalus

    At Madinat al-Zahra near Córdoba, craftsmen carve the marble basin that now stands in the prayer hall: the oldest object in the madrasa.

  2. 1106–1142

    The Ben Youssef Mosque

    The Almoravid sultan Ali ibn Yusuf founds the great mosque that gives the madrasa its name. Its ablutions pavilion, the Almoravid Koubba (around 1125), still stands next door.

  3. 14th century

    The first madrasa

    A first madrasa is founded on the site by the Marinid sultan Abu al-Hasan (r. 1331–1348).

  4. 1564–1565

    The Saadian masterpiece

    The Saadian sultan Abdallah al-Ghalib rebuilds the madrasa on a grand scale; an inscription dates its completion to 972 AH. It becomes the largest madrasa in Morocco, with 134 student rooms.

  5. 1565–1960

    Four centuries of students

    Students from across Morocco live in the small rooms and study religious sciences, philosophy, medicine and mathematics.

  6. 1960 · 1982

    From school to monument

    The madrasa closes as a school in 1960. Restored, it opens to the public as a historical monument in 1982.

  7. 2017

    A royal visit

    After the King’s visit to the old medina on 9 January 2017, the Ministry of Habous and Islamic Affairs launches a full restoration.

  8. 2018–2022

    Restoration and reopening

    Closed November 2018 to April 2022, the madrasa reopens every day, with tickets sold at the entrance. Today it welcomes more than 230,000 visitors a year.

A madrasa next to the great mosque

The madrasa takes its name from its neighbour: the Ben Youssef Mosque, founded by the Almoravid sultan Ali ibn Yusuf (r. 1106–1142) and rebuilt in later centuries (Wikipedia). The mosque was once the main mosque of Marrakech, and a college beside it was a natural place to train scholars.

The first madrasa here dates from the Marinid dynasty, founded by the Marinid sultan Abu al-Hasan (r. 1331–1348), a sultan who founded madrasas in several Moroccan cities.

The Saadian rebuilding

In the 16th century the Saadian dynasty made Marrakech its capital again. the Saadian sultan Abdallah al-Ghalib rebuilt the madrasa on a much grander scale; an inscription records its completion in 972 AH, 1564–1565. The result was the largest madrasa in Morocco, built around a single great courtyard with 134 rooms for students.

The decoration you see today belongs to that rebuilding: carved cedar, sculpted stucco, zellij tilework, marble and calligraphy, in the style that links Marrakech with Fez and Al-Andalus.

Carved cedar eaves and lintels above the courtyard of the Ben Youssef Madrasa
Carved cedar at the top of the courtyard walls, from the Saadian rebuilding.

Four centuries of students

Students came from across Morocco and beyond to study religious sciences, philosophy, medicine and mathematics. They lived in the small rooms upstairs and around the side courtyards, and studied in the prayer hall and courtyard. The madrasa was a working college until 1960.

From school to monument

After it closed, the building was refurbished and opened to the public as a historical site in 1982. It became one of the most visited monuments in Marrakech: the official site now counts more than 230,000 visitors a year.

The latest restoration (2018–2022)

Following the King’s visit to the old medina on 9 January 2017, the Ministry of Habous and Islamic Affairs undertook a full restoration (official restoration page). The madrasa was closed from November 2018 to April 2022. Since reopening, tickets are sold at the entrance and the building is open every day.

The basin that is older than the building

The oldest piece in the madrasa is a marble basin: a marble basin carved in Córdoba’s Madinat al-Zahra between 1002 and 1007, with a Kufic inscription naming Abd al-Malik, son of the vizier al-Mansur, and carvings of birds and fish. How it reached Marrakech is told differently by different sources; the official site says it was brought from Al-Andalus by the Almoravid ruler Youssef Ben Tachfine.

See the building room by room in what to see inside, or the oldest monument in the area, the Almoravid Koubba, in what to see nearby.

Questions people ask

Who built the Ben Youssef Madrasa?

The present building was erected by the Saadian sultan Abdallah al-Ghalib in 1564–1565. The first madrasa on the site was founded by the Marinid sultan Abu al-Hasan (r. 1331–1348).

How old is the Ben Youssef Madrasa?

The building you visit was completed in 1564–1565, so it is more than 460 years old. A madrasa stood on the site from the 14th century.

When did the Ben Youssef Madrasa stop being a school?

It closed as a school in 1960 and opened to the public as a historical monument in 1982.

Why is it called Ben Youssef?

It takes its name from the neighbouring Ben Youssef Mosque, founded by the Almoravid sultan Ali ibn Yusuf in the 12th century.