In the meantime the mother of Ahmed had married the influential General Baik-Bey, and when the latter was given the rulership of Egypt in the year 868 a. d. (254 a.h.), he sent his stepson as proxy, according to the custom of the time. On the 23d Ramadhan 254 (15th September, 868), Ahmed ibn Tulun arrived at Fostat. He encountered great difficulties, and discovered that at Alexandria and also in other districts there were independent emirs, who were not directly under the ruler. Soon after his arrival an insurrection broke out in Upper Egypt. Ahmed showed himself born to the place; he crushed the uprising and also suppressed a second revolt that was threatening. By degrees he cleverly undermined the power of his colleagues, and made his own position in Fostat secure.
When Muaffik was nominated commander-in-chief of the West by his brother Mustamid (elected caliph in 870), Ahmed managed to secure the good-will of the vizier of the caliph and thus to obtain the command in Egypt. He kept the regent in Baghdad in a state of complacency, occasionally sending him tribute; but, as wars with the Sinds began to trouble the caliphate, he did not think it worth while to trouble himself further about Baghdad, and decided to keep his money for himself. Muaffik was not the man to stand this, and prepared to attack Ahmed, but the disastrous results of the last war had not yet passed away. When the army intended for Egypt was camping in Mesopotamia, there was not enough money to pay the troops, and the undertaking had to be deferred.
Ahmed had a free hand over the enormous produce of Egypt. The compulsory labour of the industrious Kopt brought in a yearly income of four million gold dinars ($10,120,000), and yet these people felt themselves better off than formerly on account of the greater order and peace that existed under his energetic government. It cannot be denied that Ahmed in the course of years became much more extravagant and luxurious, but he used his large means in some measure for the betterment of the country. He gave large sums not only for the erection of palaces and barracks, but also for hospitals and educational advancement. To this day is to be seen the mosque of Ibn Tulun, built by him in the newer part of Fostat,—a district which was later annexed to the town of Cairo.
[Illustration: 359.jpg SANCTUARY OF THE MOSQUE OF IBN TULUN]
The numerous wars in which Muaffik was involved gave Ahmed the opportunity of extending his power beyond the boundaries of Egypt. The ruler of the caliphate of Damascus died in the year 897, and soon after Ahmed marched into Syria, and, with the exception of Antioch, which had to be taken by force, the whole country fell into the hands of the mighty emir. The commanders of isolated districts did not feel themselves encouraged to offer any resistance, for they had no feeling of faithfulness for the government, nor had they any hope of assistance from Baghdad.