Fatimid Caliphate
In the 1040s, the Zirids (governors of North Africa under the Fatimids) declared their independence from the Fatimids and their conversion to Sunni Islam, which led to the devastating Banū Hilal invasions.  After about 1070, the Fatimid hold on the Levant coast and parts of Syria was challenged first by Turkic (Seljuk) invasions, then the Crusades, so that Fatimid territory shrank until it consisted only of Egypt.