In the late 9th century, internal conflict amongst the Abbasids made control of the outlying areas of the empire increasingly tenuous, and in 868 the Turkic officer Ahmad ibn Tulun established himself as an independent governor of Egypt.
During his reign (868–884) and those of his successors, the Tulunid domains were expanded to include Jordan Rift Valley, as well as Hejaz, Cyprus and Crete.
Ahmad was succeeded by his son Khumarawayh, whose military and diplomatic achievements made him a major player in the Middle Eastern political stage.
After Khumarawayh's death, his successor emirs were ineffectual rulers, allowing their Turkic and black slave-soldiers to run the affairs of the state.
In 905, the Tulunids were unable to resist an invasion by the Abbasid troops, who restored direct caliphal rule in Syria and Egypt.
In 870, Abū Aḥmad (b. al-Mutawakkil) al-Muwaffaḳ (d. 891) was summoned from exile in Mecca to re-establish Abbasid authority over southern Iraq.
[5] Ahmad ibn Ṭūlūn was a member of the mostly Central Asian Turkish guard formed initially in Baghdad, then later settled in Samarra, upon its establishment as the seat of the caliphate by al-Mu'tasim.
[4] His reign of more than ten years allowed him to leave behind a well-trained military, a stable economy and an experienced bureaucracy to oversee the state affairs.
[5] With full autonomy, once the tax income no longer had to go to the Caliph in Baghdad, it was possible to develop irrigation works and build a navy, which greatly stimulated the local economy and trade.
In 878, the Jordan valley was occupied by the Tulunids, extending in the north to the outposts in the Anti-Lebanon mountains on the Byzantine border, enabling them to defend Egypt against Abbasid attack.
The first challenge he faced was the invasion of Syria by armies sent by al-Muwaffak, the de facto ruler during the reign of caliph al-Mu'tamid.
Khumārawayh also had to deal with the defection of Ahmad ibn Muhammad al-Wasiti, a long-time and key ally of his father's, to the invaders' camp.
[5] The young Tulunid achieved political and military gains, enabling him to extend his authority from Egypt into northern Iraq, and as far north as Tarsus by 890.
Both treaties also sought to confirm the status of the Tulunid governor as a vassal of the caliphal family seated in Baghdad.
[4] Khumarawayh's son Abu 'l-Asakir (also known as Jaysh) was deposed by the Tulunid military command in 896, shortly after coming to power.
Though he would rule for eight years, he was unable to revitalize the dynasty, and was assassinated in 904, after the Abbasid army had recovered Syria and was on the verge of invading Egypt itself.
[9] Through the mediation of his closest adviser, al-Ḥusayn ibn Jaṣṣāṣ al-Jawharī, Khumārawayh arranged for one of the great political marriages of medieval Islamic history.
The tale of the splendid nuptials of Ḳaṭr al-Nadā lived on in the memory of the Egyptian people well into the Ottoman period, and were recorded in the chronicles and the folk-literature.
[12] The official support granted by ibn Ṭūlūn to the Shafi'i school of Islamic jurisprudence did much to resuscitate and popularize it after it went into decline during the Mihna.
His military prowess, in fact, was strengthened by his multi-ethnic regiments of black Sudanese soldiers, Greek mercenaries and fresh Turkic troops from Turkestan.
By bestowing privileges upon the tribesmen, and converting them into an efficient and loyal bodyguard, he brought peace to the region between Egypt and Syria.
[9] A list of military engagements in which the Tulunid army constituted a significant party is as follows: During the reign of Ahmad ibn Tulun, the Egyptian economy remained prosperous.
In his administration, ibn Tulun asserted his autonomy, refusing to pay taxes to the central Abbasid government in Baghdad.
[5] Under Ahmad's son, Khumarawayh, the Abbasids formally entered into a treaty with the Tulunids, thereby ending hostilities and resuming the payment of tribute.
[5] The Tulunid administration also helped the economy prosper, by maintaining political stability, which in Egypt is a sine qua non.
Isolated revolts among the Copts and some Arab nomads in upper Egypt, which never threatened the dynasty's power, were actually a response to the more efficient Tulunid fiscal practices.
[5] Ahmad ibn Tulun's agrarian and administrative reforms encouraged peasants to work their lands with zeal, despite the heavy taxes.