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.