"When the Fatimids moved their capital to Egypt in 969, they left north Africa in charge of viceroys from the Zirid clan of Sanhaja Berbers, who were Fatimid loyalists and enemies of the Zanata.The Zirids in turn divided their territories, assigning some to the Hammadid branch of the family to govern.