It was constructed between 1236 and 1249 on the orders of the first Hafsid sultan Abu Zakariya Yahya.
[1] From the street, a staircase climbs to the entrance where a bent passage leads to a central square courtyard.
In the middle of the other two sides of the courtyard are vaulted rooms, entered through large arches, which were probably classrooms.
A second floor exists, with a gallery around the courtyard leading to 19 small bedrooms for students.
[2] The madrasa was restored in the nineties and became a training center for leather and shoe artisans.