In 254 / 868, Ahmad Ibn
Tulun (r. 254–270 / 868–84), a 33 year-old Turkish soldier of the Abbasid army in Samarra, Iraq, was sent to Egypt as deputy governor with an army of some 100,000 men. Egypt was suffering from a number of political and economic difficulties caused by political unrest and the continuous drain of its resources after the death of Harun al-Rashid in 193 / 809. Ibn
Tulun succeeded in stabilising the region, ensuring the flow of revenue again. Once he was promoted to Governor of Egypt in 256 / 870, however, he began to hold back the revenue, re-investing it in agricultural reforms and industry. He renovated the Nilometer, built the district of al-Qata’i‘– following the model of Samarra – to accommodate his army and government, and built a mosque
in his name in the city centre.