The Zirid dynasty (Arabic: الزيريون, romanized: az-zīriyyūn), also known as the Banu Ziri (Arabic: بنو زيري, romanized: banū zīrī), was a Sanhaja Berber dynasty from what is now Algeria which ruled the central Maghreb from 972 to 1014 and Ifriqiya in 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 the North African history when political power was held by Berber dynasties, including the Almoravids, Almohads, Zayyanids, Marinids and Hafsids.
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 Badisides 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. 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 the Zirid conquest of the western Maghreb 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 Córdoba 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 Umayyad 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.
In Sicily the Kalbids continued to govern on behalf of the Fatimids but the island descended into political disarray during the 11th century, inciting the Zirids to intervene on the island. In 1025 (or 1021), al-Mu'izz ibn Badis sent a fleet of 400 ships to the island in response to the Byzantines reconquering Calabria (in southern Italy) from the Muslims, but the fleet was lost in a powerful storm off the coast of Pantelleria. In 1036, the Muslim population of the island request aid from al-Mu'izz to overthrow the Kalbid emir Aḥmad ibn Yūsuf al-Akḥal, whose rule they considered flawed and unjust. The request also contained a pledge to recognize al-Mu'izz as their ruler. Al-Mu'izz, eager to expand his influence after the fragmentation of Zirid North Africa, accepted and sent his son, 'Abdallah, to the island with a large army. Al-Akhal, who had been in negotiations with the Byzantines, requested help from them. A Byzantine army intervened and defeated the Zirid army on the island, but it then withdrew to Calabria, allowing 'Abdallah to finish off al-Akhal. Al-Akhal was besieged in Palermo and killed in 1038. 'Abdallah was subsequently forced to withdraw from the island, either due to the ever-divided Sicilians turning against him or due to another Byzantine invasion in 1038, led by George Maniakes. Another Kalbid amir, al-Hasan al-Samsam, was elected to govern Sicily, but Muslim rule there disintegrated into various petty factions leading up to the Norman conquest of the island in the second half of the 11th century.
Hilalian invasions and withdrawal to Mahdia
The Zirids renounced the Fatimids and recognized the Abbasid Caliphs in 1048–49, or sometime between 1041 and 1051. The recognition of the Abbasids was nominal, as the Abbasids themselves were in political decline and could not impose direct authority in the region. In retaliation against the Zirids, the Fatimids sent the Arab tribes of the Banu Hilal and the Banu Sulaym to the Maghreb. The Banu Sulaym settled first in Cyrenaica, but the Banu Hilal continued towards Ifriqiya. The Zirids attempted to stop their advance towards Ifriqiya, they sent 30,000 Sanhaja cavalry to meet the 3,000 Arab cavalry of Banu Hilal in the Battle of Haydaran of 14 April 1052. Nevertheless, the Zirids were decisively defeated and were forced to retreat, opening the road to Kairouan for the Hilalian Arab cavalry. The resulting anarchy devastated the previously flourishing agriculture, and the coastal towns assumed a new importance as conduits for maritime trade and bases for piracy against Christian shipping, as well as being the last holdout of the Zirids. The Banu Hilal invasions eventually forced al-Mu'izz ibn Badis to abandon Kairouan in 1057 and move his capital to Mahdia, while the Banu Hilal largely roamed and pillaged the interior of the former Zirid territories.
As a result of the Zirid withdrawal, various local principalities emerged in different areas. In Tunis, the shaykhs of the city elected Abd al-Haqq ibn Abd al-Aziz ibn Khurasan (r. 1059–1095) as local ruler. He founded the local Banu Khurasan dynasty that governed the city thereafter, alternately recognizing the Hammadids or the Zirids as overlords depending on the circumstances. In Qabis (Gabès), the Zirid governor, al-Mu'izz ibn Muhammad ibn Walmiya remained loyal until 1062 when, outraged by the expulsion of his two brothers from Mahdia by al-Mu'izz ibn Badis, he declared his independence and placed himself under the protection of Mu'nis ibn Yahya, a chief of Banu Hilal. Sfaqus (Sfax) was declared independent by the Zirid governor, Mansur al-Barghawati, who was murdered and succeeded by his cousin Hammu ibn Malil al-Barghawati. Meanwhile, in Gafsa, its governor Abdullah ibn al-Rand became independent, founding the Banu al-Rand dynasty that ruled the Jerid region and other areas.