Khurasanid dynasty
The Khurasanid Dynasty () was a Sanhaja Berber Sunni Muslim dynasty centered in Tunisia. It ruled an independent principality in Tunis from 1059 to 1148 when they became governors of Ifriqiya under the Siculo-Norman kings and their annexions into the Kingdom of Africa, until the end of the dynasty in 1159 due to the Almohad conquest. History. 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. The fourth Khurasanid ruler, Ahmad ibn Abd al-Aziz (1107-1128), was considered by Ibn Khaldoun to be the most remarkable of his family. He built ramparts around Tunis to defend it and secured guarantees of safe passage for travellers from the Banu Hilal. The principality was annexed to the Hammadid kingdom in 1128, before it recovered its independence in 1148. After a period of Hammadid  rule and a brief interregnum during which the people of Tunis sought to elect a new leader, Khurasanid rule was restored when Abu Bakr ibn Ismail was smuggled over the city walls at night in a basket. Seven months later he was drowned by his nephew Abd Allah ibn Abd al-Aziz, who succeeded him. Under Khurasanid rule, the small independent kingdom resumed foreign trade relations and people enjoyed unprecedented prosperity. The city was embellished with new buildings, including a fortified palace, and the outer defenses were strengthened. In 1159, the last Khurasanid ruler, Ali ibn Ahmad ibn Abd al -Aziz, was ousted by the Almohad Caliphate and sent into exile. The Almohads annexed the whole Ifriqiya to its empire, putting an end to Khurasanid rule.