Over 37 years , during the reign of Ibn Tulun ,
Egypt
gained a high importance and enjoyed prosperity and stability . After his death , Egypt became an unstable province for 30 years and it remained weak until Muhammad Ibn Tughg the Ikhshid came to Egypt . He was appointed Governor of Egypt in 935 . He was given the title of Ikhshid (which means 'prince' in Persian) in 937 , the name he gave to his dynasty . This title allowed him to rule somewhat independently of the Caliphate . From 935 and until his death , he ruled the country under the symbolic order of the Baghdad Caliphate .
Bin Tughj purchased Abu al-Misk Kafur as a slave in 923 and , recognizing the slave's potential , made him a tutor to his children and a military officer . Eventually , al-Misk gained so much power that he succeeded Bin Tughj .