text: In order to punish them the Fatimids sent the Arab Banu Hilal and Banu Sulaym against them.The resultant war is recounted in the epic Tāghribāt.In Al-Tāghrībāt the Amazigh Zirid Hero Khālīfā Al-Zānatī asks daily, for duels, to defeat the Hilalan hero Ābu Zayd al-Hilalī and many other Arab knights in a string of victories.The Zirids, however, were ultimately defeated ushering in an adoption of Arab customs and culture.The indigenous Amazigh tribes, however, remained largely independent, and depending on tribe, location and time controlled varying parts of the Maghreb, at times unifying it (as under the Fatimids).The Fatimid Islamic state, also known as Fatimid Caliphate made an Islamic empire that included North Africa, Sicily, Palestine, Jordan, Lebanon, Syria, Egypt, the Red Sea coast of Africa, Tihamah, Hejaz and Yemen.Caliphates from Northern Africa traded with the other empires of their time, as well as forming part of a confederated support and trade network with other Islamic states during the Islamic Era.The Berber people historically consisted of several tribes.The two main branches were the Botr and Barnès tribes, who were divided into tribes, and again into sub-tribes.Each region of the Maghreb contained several tribes (for example, Sanhadja, Houara, Zenata, Masmouda, Kutama, Awarba, and Berghwata).All these tribes made independent territorial decisions.Several Amazigh dynasties emerged during the Middle Ages in the Maghreb and other nearby lands.Ibn Khaldun provides a table summarising the Amazigh dynasties of the Maghreb region, the Zirid, Ifranid, Maghrawa, Almoravid, Hammadid, Almohad, Merinid, Abdalwadid, Wattasid, Meknassa and Hafsid dynasties.Both of the Hammadid and Zirid empires as well as the Fatimids established their rule in all of the Maghreb countries.The Zirids ruled land in what is now Algeria, Tunisia, Morocco, Libya, Spain, Malta and Italy.