At length, in the year 861 (a.h. 247), Mutawakkil discovered the scarcely concealed treachery of his son, and reproved him publicly. Some days later the caliph was murdered at night by the captain of his Turkish Guard, and Muntasir, who is commonly supposed to have instigated the crime, was immediately proclaimed as his successor in the government.
The most important event in Egypt during the reign of Mutawakkil was the falling in of the Nilometer at Fostât. This disaster, was the result of an earthquake of considerable violence, which was felt throughout Syria. The caliph ordered the reconstruction of the Nilometer, which was accomplished the same year, and the Nilometer of the Island of Rhodha was then called Magaz el-jedid, or the New Nilometer.
After reigning scarcely a year, Muntasir himself succumbed, most probably to poison, and his cousin Ahmed was elected to the caliphate by the Turkish soldiery, with the title of Mustain. During his brief reign the Moslems were defeated by the Byzantines at Awasia, and in 866 the Turkish soldiers revolted against the caliph and elected his brother Mutazz in his place. Mustain was, however, allowed to retire to Ma’szit. He was permitted to take an attendant with him, and his choice fell upon Ahmed, the son of Tulun, already mentioned. Ahmed served the dethroned prince truly, and had no part in the subsequent murder of this unhappy man.
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 Fostât. 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 Fostât 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 Fostât,—a district which was later annexed to the town of Cairo.
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.
The triumphant march of Tulun was hindered in the year 879 by bad news from Fostât. One of his sons, El-Abbas, had quarrelled with his father, and had marched to Barca, with troops which he led afterwards to disaster, and had taken with him money to the amount of 1,000,000 dinars ($2,530,000). He thought himself safe from his enraged father there, but the latter quickly returned to Fostât, and the news of the ample preparations which he was hastening for the subjection of his rebel son caused El-Abbas to place himself still farther out of his reach. He suddenly attacked the state of Ibrahim II. (the Aghlabite), and caused serious trouble with his soldiery in the eastern districts of Tripolis. The neighbouring Berbers gave Ibrahim their assistance, and Abbas was defeated and retreated to Barca in 880. He remained there some time until an army sent by Ahmed annihilated his troops and he himself was taken prisoner.