Zirid dynasty
The Khurasanid dynasty was founded during the 11th century by Abd al-Haqq ibn Abd al-Aziz ibn Khurasan, who was appointed as governor of Tunis by the Hammadid dynasty. This followed entreaties by locals seeking protection from raids by the Banu Hilal, as the Zirid dynasty sultan Al-Mu'izz ibn Badis offered none. Abd al-Haqq soon made the city an independent principality that would be governed by his family for almost a century.