renovating its ceiling, reinforcing its walls, and building or rebuilding two of its entrance gates in 1293 – as well as to the Great Mosque of al-Zaytuna in Tunis. The Hafsids also introduced the first madrasas to the region, beginning with the Madrasa al-Shamma῾iyya built in Tunis in 1238 (or in 1249 according to some sources). This was followed by many others (almost all of them in Tunis) such as the Madrasa al-Hawa founded in the 1250s, the Madrasa al-Ma'ridiya (1282), and the Madrasa al-Unqiya (1341). Many of these early madrasas, however, have been poorly preserved or have been considerably modified in the centuries since their foundation. The Madrasa al-Muntasiriya, completed in 1437, is among the best preserved madrasas of the Hafsid period. Flags Hafsid rulers See also Almohad Caliphate Hafsids of Bejaïa List of Sunni Muslim dynasties References Medieval Algeria 13th century in Ifriqiya 14th century in Ifriqiya 15th century in Ifriqiya 16th century in Ifriqiya States and territories established in 1229 States and territories disestablished in 1574