The Tulunids (Arabic: الطولونيون), were a dynasty of Turkic origin and were the first independent dynasty to rule Islamic Egypt, as well as much of Syria. They remained independent from 868, when they broke away from the central authority of the Abbasid dynasty that ruled the Islamic Caliphate, until 905, when the Abbasids restored the Tulunid domains to their control.
In the late 9th century, internal conflict amongst the Abbasids meant that control of the outlying areas of the empire was increasingly tenuous, and in 868 the Turkic officer Ahmad ibn Tulun established himself as an independent governor of Egypt. He subsequently achieved nominal autonomy from the central Abbasid government. During his reign (868–884) and those of his successors, the Tulunid domains were expanded to include Jordan Rift Valley, as well as Hijaz, 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. The Abbasids affirmed their recognition of the Tulunids as legitimate rulers, and the dynasty's status as vassals to the caliphate. 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.
The Tulunid period was marked by economic and administrative reforms alongside cultural ones. Ahmad ibn Tulun changed the taxation system and aligned himself with the merchant community. He also established the Tulunid army. The capital was moved from Fustat to al-Qata'i, where the celebrated mosque of Ibn Tulun was constructed.
The rise and fall of the Tulunids occurred against a backdrop of increasing regionalism in the Muslim world. The Abbasid caliphate was struggling with political disturbances and losing its aura of universal legitimacy. There had previously been Coptic and Alid-led movements in Egypt, without more than temporary and local success. There was also a struggle for power between the Turkish military command and the administration of Baghdad. Furthermore, there was a widening imperial financial crisis. All of these themes would recur during the Tulunid rule.
The internal politics of the Abbasid caliphate itself seem to have been unstable. 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. Quickly, however, he became the de facto ruler of the caliphate. As a result of this uncertainty, Ahmad ibn Tulun could establish and expand his authority. Thus the Tulunids wielded regional power, largely unhindered by imperial will; as such, the Tulunids can be compared with other 9th-century dynasties of the Muslim world, including the Aghlabids and the Tahirids.