Salah al-Din Al-Ayyubi (Saladin) assumed control of Egypt upon the death of the last Fatimid Caliph Al-Adid in 1171. Salah al-Din played a great role in establishing a Sunni state in Egypt by building a lot of Sunni schools (madrasas).
The Fatimids founded in Egypt in the year 969, was the fourth Islamic Caliphate and belonged to the Isma'ili Shi'a school of faith.
In 640 A.D., Amr bin Al-As conquered Egypt and he besieged the Fortress of Babylon till the surrender of the Byzantine forces there in 641 A.D.
After the death of Mohamed bin Tughj Al-Ikhshid, his minister Abu el-Misk Kafour had the guardianship over Al-Ikhshid’s two sons.