text: The Hammadids captured and held important regions such as Ouargla, Constantine, Sfax, Susa, Algiers, Tripoli and Fez establishing their rule in every country in the Maghreb region.The Fatimids which was created and established by the Kutama Berbers conquered all of North Africa as well as Sicily and parts of the Middle East.Following the Berber revolt numerous independent states emerged across the Maghreb.In Algeria the Rustamid Kingdom was established.The Rustamid realm stretched from Tafilalt in Morocco to the Nafusa mountains in Libya including south, central and western Tunisia therefore including territory in all of the modern day Maghreb countries, in the south the Rustamid realm expanded to the modern borders of Mali and included territory in Mauritania.Once extending their control over all of the Maghreb, part of Spain and briefly over Sicily, originating from modern Algeria, the Zirids only controlled modern Ifriqiya by the 11th century.The Zirids recognized nominal suzerainty of the Fatimid caliphs of Cairo.El Mu'izz the Zirid ruler decided to end this recognition and declared his independence.The Zirids also fought against other Zenata Kingdoms, for example the Maghrawa, a Berber dynasty originating from Algeria and which at one point was a dominant power in the Maghreb ruling over much of Morocco and western Algeria including Fez, Sijilmasa, Aghmat, Oujda, most of the Sous and Draa and reaching as far as M'sila and the Zab in Algeria.As the Fatimid state was at the time too weak to attempt a direct invasion, they found another means of revenge.Between the Nile and the Red Sea were living Bedouin nomad tribes expelled from Arabia for their disruption and turbulency.The Banu Hilal and the Banu Sulaym for example, who regularly disrupted farmers in the Nile Valley since the nomads would often loot their farms.