 Eventually the power loss of the Abbasids in Baghdad has led for general upon general to take over rule of Egypt, yet being under Abbasid allegiance, the Ikhshids and the Tulunids dynasties were among the most successful to defy the Abbasid Caliph.Muslim rulers nominated by the Caliphate remained in control of Egypt for the next six centuries, with Cairo as the seat of the Fatimid Caliphate.With the end of the Kurdish Ayyubid dynasty, the Mamluks, a Turco-Circassian military caste, took control about 1250.