Abdallah al-Ghalib
Located in the medina with a green tiled roof and a minaret, Ben Youssef Mosque (also Bin Yusuf Mosque) is the oldest mosque in the city. It was originally built in the 12th century by the Almoravid Sultan Ali ibn Yusuf, whom it is named after. It served as the city's main Friday mosque. After being abandoned during the Almohad period and falling into ruin, it was rebuilt in the 1560s by the Saadian sultan Abdallah al-Ghalib and then completely rebuilt again by the Alaouite sultan Moulay Sliman at the beginning of the 19th century, with construction of the minaret finishing in 1819 or 1820. This reconstruction has eliminated all traces of the original mosque, and the current mosque is much smaller than the original and features a very different "qibla" orientation. Abdallah al-Ghalib was also responsible for building the adjacent Ben Youssef Madrasa, which contained a library and operated as an educational institution up until the 20th century.