Banu Khazrun

After the Fatimids moved their capital to Cairo in the 970s, they left their territories in the Maghreb under the control of their vassals, the Zirid dynasty.

[1][2][3][4] Fulful fought a protracted war against Badis ibn al-Mansur, the Zirid emir, and sought outside help from the Fatimid caliphs themselves in Cairo and even from the Andalusi Umayyads in Córdoba.

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.

[8] In 1026–7, Khalifa obtained from the Fatimid caliph in Cairo, al-Zahir, a formal confirmation of his position as governor of Tripoli, while agreeing to send gifts to al-Mu'izz ibn Badis.

Eventually, al-Muntasir emerged victorious as the ruler of Tripoli and the Maghrawa in the region, a position which he kept for a long period.

The Zirids and their allies were nonetheless defeated and forced to retreat, leaving the Banu Hilal to occupy the inland plains across the region, although Al-Muntasir still retained control of Tripoli.

[5] Sometime around 1075, al-Muntasir led the Banu Adi, an Arab tribe, on an expedition against the Hammadid kingdom to the west (in present-day Algeria).