The Hammadids were an offshoot of this dynasty.
When the Fatimids moved their base to Egypt in 972, Ziri's son Buluggin ibn Ziri (971-984) was appointed viceroy of Ifriqiya. The removal of the fleet to Egypt made the retention of Kalbid Sicily impossible, while Algeria broke away under the governorship of Hammad ibn Buluggin, Buluggin's son.
The relationship with the Fatimid overlords was variable - in 1016 thousands of Shiites lost their lives in rebellions in Ifriqiya, and the Fatimids encouraged the defection of Tripolitania from the Zirids, but nevertheless the relationship remained close. In 1045 the Zirids broke away completely by recognising the Abbasids of Baghdad as rightful Caliphs.
The Fatimids sent the Bedouin tribes of Banu Hilal and Banu Sulaym to Ifriqiya. The Berber troops defected and the Zirids were defeated, and the land laid waste by the Bedouin. 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.
After the loss of Kairouan (1057) the rule of the Zirids was limited to a coastal strip with Mahdia as the capital, while several Bedouin Emirates formed inland. Between 1146 and 1148 the Normans of Sicily conquered all the coastal towns, and in 1152 the last Zirids in Algeria were superseded by the Almohads.
The Zirids are also known as a dynasty of the Taifa of Granada kingdom. The founder was Ziri Manad and his main descendant, Zawi ben Ziri, a general of the Caliphate of Córdoba army, under the orders of Caliph Hisham II, and his Hayib Almansur
After his death in Medinaceli August 12th 1002 (25 Ramadan 392), there is a civil war that spreads on Al-Andalus. Zawi ben Ziri takes part as General of one of the Armies and destroys several cities, as in 1011 Medina Azahara and March 1013 Córdoba. He is founder of Taifa of Granada, and he declares himself as first Emir. He died poisoned in Algiers in 1019.
The Zirids also were governors of other kingdoms as Malaga
History tells that art and civil construction made under the rule of Zirids governors and emirs in Al-Andalus, mainly in Taifa of Granada, were very important. An example is the Cadima Alcazaba in Albayzin, Granada and part of the old wall surrounding Granada.