The Zirid dynasty (), also known as the Banu Ziri (), was a Sanhaja Berber dynasty from what is now Algeria which ruled the central Maghreb from 972 to 1014 and Ifriqiya (eastern Maghreb) from 972 to 1148.
Descendants of Ziri ibn Manad, a military leader of the Fatimid Caliphate and the eponymous founder of the dynasty, the Zirids were emirs who ruled in the name of the Fatimids. The Zirids gradually established their autonomy in Ifriqiya through military conquest until officially breaking with the Fatimids in the mid-11th century. The rule of the Zirid emirs opened the way to a period in North African history where political power was held by Berber dynasties such as the Almoravid dynasty, Almohad Caliphate, Zayyanid dynasty, Marinid Sultanate and Hafsid dynasty.
Under Buluggin ibn Ziri the Zirids extended their control westwards and briefly occupied Fez and much of present-day Morocco after 980, but encountered resistance from the local Zenata Berbers who gave their allegiance to the Caliphate of Cordoba. To the east, Zirid control was extended over Tripolitania after 978 and as far as Ajdabiya (in present-day Libya). One member of the dynastic family, Zawi ibn Ziri, revolted and fled to al-Andalus, eventually founding the Taifa of Granada in 1013, after the collapse of the Caliphate of Cordoba. Another branch of the Zirids, the Hammadids, broke away from the main branch after various internal disputes and took control of the territories of the central Maghreb after 1015. The main branch of the Zirids, also called the Badisides, occupied only Ifriqiya between 1048 and 1148. They were based in Kairouan until 1057, when they moved the capital to Mahdia on the coast. The Zirids of Ifriqiya also intervened in Sicily during the 11th century, as the Kalbids, the dynasty who governed the island on behalf of the Fatimids, fell into disorder.
The Zirids of Granada surrendered to the Almoravids in 1090, but the Badicides and the Hammadids remained independent during this time. Sometime between 1041 and 1051 the Zirid ruler al-Mu'izz ibn Badis renounced the Fatimid Caliphs and recognized the Sunni Muslim Abbasid Caliphate. In retaliation, the Fatimids instigated the migration of the Banu Hilal tribe to the Maghreb, dealing a serious blow to Zirid power in Ifriqiya. In the 12th century, the Hilalian invasions combined with the attacks of the Normans of Sicily along the coast further weakened Zirid power. The last Zirid ruler, al-Hasan, surrendered Mahdia to the Normans in 1148, thus ending independent Zirid rule. The Almohad Caliphate conquered the central Maghreb and Ifriqiya by 1160, ending the Hammadid dynasty in turn and finally unifying the whole of the Maghreb.
History
Origins and establishment The Zirids were Sanhaja Berbers, from the sedentary Talkata tribe, originating from the area of modern Algeria. In the 10th century this tribe served as vassals of the Fatimid Caliphate, an Isma'ili Shi'a state that challenged the authority of the Sunni Abbasid caliphs. The progenitor of the Zirid dynasty, Ziri ibn Manad (r. 935–971) was installed as governor of the central Maghreb (roughly north-eastern Algeria today) on behalf of the Fatimids, guarding the western frontier of the Fatimid Caliphate.
With Fatimid support Ziri founded his own capital and palace at 'Ashir, south-east of Algiers, in 936. He proved his worth as a key ally in 945, during the Kharijite rebellion of Abu Yazid, when he helped break Abu Yazid's siege of the Fatimid capital, Mahdia. After playing this valuable role, he expanded 'Ashir with a new palace circa 947. In 959 he aided Jawhar al-Siqili on a Fatimid military expedition which successfully conquered Fez and Sijilmasa in present-day Morocco. On their return home to the Fatimid capital they paraded the emir of Fez and the "Caliph" Ibn Wasul of Sijilmasa in cages in a humiliating manner.Messier, Ronald A.; Miller, James A. (2015). The Last Civilized Place: Sijilmasa and Its Saharan Destiny. University of Texas Press. Pellat, Charles (1991). "Midrār". In Bosworth, C. E.; van Donzel, E. & Pellat, Ch. (eds.). The Encyclopaedia of Islam, New Edition, Volume VI: Mahk–Mid. Leiden: E. J. Brill. After this success, Ziri was also given Tahart to govern on behalf of the Fatimids. He was eventually killed in battle against the Zanata in 971.
When the Fatimids moved their capital to Egypt in 972, Ziri's son Buluggin ibn Ziri (r. 971–984) was appointed viceroy of Ifriqiya, spawning a dynasty whose rulers held the title of amir. Buluggin's position was confirmed on 2 October 972 at Sardaniya, a place outside Kairouan where the Fatimid caliph al-Mu'izz was preparing for his departure to Egypt. On 20 December 972, Buluggin took up residence in Sabra al-Mansuriyya, the Fatimid caliph's former palace-city just outside the walls of Kairouan, where his successors continued to reside until the mid-11th century. Buluggin spent much of his time in the west, however. From 974 onward he entrusted the governance of Ifriqiya to Abd Allah ibn Muhammad al-Katib, a secretary with whom he replaced the Fatimid-appointed secretary, Ziyadat Allah. In 974 or 977–978 (364 or 367 AH), he founded another capital and palace complex in Ashir, next to his father's foundation, which he favoured over Kairouan. Ashir continued to be the capital of the Zirids in the central Maghreb, while Kairouan was the capital of Ifriqiya.
Buluggin soon led a new expedition west and by 980 he had conquered Fez and most of the western Maghreb (present-day Morocco), which had previously been retaken by the Umayyads of Cordoba in 973. He also led a successful expedition to Barghawata territory, from which he brought back a large number of slaves to Ifriqiya. In 978 the Fatimids also granted Buluggin overlordship of Tripolitania (in present-day Libya), allowing him to appoint his own governor in Tripoli. In 984 Buluggin died in Sijilmasa from an illness and his successor decided to abandon Morocco in 985.
Buluggin's successors and the first divisions
After Buluggin's death, he was succeeded by his son Al-Mansur ibn Buluggin (r. 984–996). After his departure to the west in 979, Bulugin had not returned to Kairouan and during this time his appointee, Abd Allah ibn Muhammad al-Katib, had amassed considerable power and influence in Ifriqiya. As a result, al-Mansur became involved in a confrontation with Abd Allah starting in 987. Later Zirid sources portray Abd Allah as a rebel who was aided by the Fatimid Caliphs, because the latter now preferred him over al-Mansur and wished to impose a new arrangement in Ifriqiya. In the end, al-Mansur ordered the successful assassination of Abd Allah and his son. In 989–990 he also suppressed a revolt by the Kutama, the traditional source of the Fatimid army, under the leadership of a pretender named Abu'l-Faraj. Following these challenges, al-Mansur was finally able to reunify the Zirid realm, but he was obliged to move his principal residence from 'Ashir to al-Mansuriyya (Kairouan) in 991, leaving his brother Yattufat to govern 'Ashir.
With al-Mansur's succession, the rule of the Zirid was now being passed on through the son of Buluggin and his descendants. This alienated the other sons of Ziri ibn Manad, who now found themselves excluded from power. In 999 many of these brothers launched a rebellion in 'Ashir against Badis ibn al-Mansur (r. 996–1016), Buluggin's grandson, marking the first serious break in the unity of the Zirids. The rebels were defeated in battle by Hammad ibn Buluggin, Badis' uncle, and most of the brothers were killed. The only remaining brother of stature, Zawi ibn Ziri, led the remaining rebels westwards and sought new opportunity in al-Andalus under the Umayyads Caliphs of Cordoba, the former enemies of the Fatimids and Zirids. He and his followers eventually founded an independent kingdom in al-Andalus, the Taifa of Granada, in 1013.
After 1001 Tripolitania broke away under the leadership of Fulful ibn Sa'id ibn Khazrun, a Maghrawa leader who founded the Banu Khazrun dynasty, which endured until 1147. Fulful fought a protracted war against Badis ibn al-Mansur and sought outside help from the Fatimids and even from the Umayyads of Cordoba, but after his death in 1009 the Zirids were able to retake Tripoli for a time. The region nonetheless remained effectively under control of the Banu Khazrun, who fluctuated between practical autonomy and full independence, often playing the Fatimids and the Zirids against each other. The Zirids finally lost Tripoli to them in 1022.
Badis appointed Hammad ibn Buluggin as governor of 'Ashir and the western Zirid territories in 997. He gave Hammad a great deal of autonomy, allowing him to campaign against the Zanata and control any new territories he conquered. Hammad constructed his own capital, the Qal'at Bani Hammad, in 1008, and in 1015 he rebelled against Badis and declared himself independent altogether, while also recognizing the Abbasids instead of the Fatimids as caliphs. Badis besieged Hammad's capital and nearly subdued him, but died in 1016 shortly before this could be accomplished. His son and successor, al-Mu'izz ibn Badis (r. 1016–1062), defeated Hammad in 1017, which forced the negotiation of a peace agreement between them. Hammad resumed his recognition of the Fatimids as caliphs but remained independent, forging a new Hammadid state which controlled a large part of present-day Algeria thereafter. Qal'at Bani Hammad was retained as the Hammadid capital, while 'Ashir became its second city.
Apogee in Ifriqiya
The Zirid period of Ifriqiya is considered a high point in its history, with agriculture, industry, trade and learning, both religious and secular, all flourishing, especially in their capital, Qayrawan (Kairouan). The early reign of al-Mu'izz ibn Badis (r. 1016–1062) was particularly prosperous and marked the height of their power in Ifriqiya. In the eleventh century, when the question of Berber origin became a concern, the dynasty of al-Mu'izz started, as part of the Zirids' propaganda, to emphasize its supposed links to the Himyarite kings as a title to nobility, a theme that was taken the by court historians of the period. Management of the area by later Zirid rulers was neglectful as the agricultural economy declined, prompting an increase in banditry among the rural population. The relationship between the Zirids and their Fatimid overlords varied - 20,000 Shiites were killed in the 1016 Ismaili massacre in Ifriqiya, and the Fatimids encouraged the defection of Tripolitania from the Zirids, but nevertheless the relationship remained close. In the 1040s, the Zirids broke away completely by adopting Sunni Islam and recognizing the Abbasids of Baghdad as rightful Caliphs, a move which was popular with the urban Arabs of Kairouan.