Hilalian invasion of Ifriqiya

The Hilalian invasion of Ifriqiya (الغزو الهلالي لإفريقية) refers to the migration of Arab tribes of Banu Hilal to Ifriqiya. It was organised by the Fatimids with the goal of punishing the Zirids for breaking ties with them and pledging allegiance to the Abbasid Caliphs.

Background
Since the Fatimid conquest of Egypt in 969, then under the rule of the Ikhshidids, vassals of the Abbasids, the Fatimids began to lose control over their possessions in the Maghreb. In 972, the Zirids declared independence from the Fatimids and recognised the Abbasids as caliphs. As retaliation, the Fatimids sent devastating Banu Hilal invasions into the Maghreb to punish the Zirids and Hammadids.

Invasion
After devastating Cyrenica in 1050, the Banu Hilal advanced westwards towards the Zirids. The Hilalians proceeded to sack and devastate Ifriqiya, they defeated the Zirids decisively in the Battle of Haydaran on April 14, 1052. The Hilalians then expelled the Zenatas from southern Ifriqiya and forced the Hammadids to pay an annual tribute, placing the Hammadids under Hilalian vassalage. The city of Kairouan was looted by the Banu Hilal in 1057 after it was abandoned by the Zirids.

Aftermath
As a result of the invasion, the Zirids and Hammadids were expelled to the coastal regions of Ifriqiya, with the Zirids being forced to move their capital from Kairouan to Mahdia, and their rule limited to a coastal strip around Mahdia, meanwhile the Hammadid rule was limited to a coastal strip between Ténès and El Kala as vassals of Banu Hilal and eventually being forced to move their capital from Beni Hammad to Béjaïa in 1090 following increasing pressure from Banu Hilal.