Signs of internal decay, in addition to the ongoing Zanj rebellion, began to appear in the 'Abbasid empire as petty states (some not so petty) emerge in different parts of the realm.
The Tulunid dynasty of Egypt, which marks the beginning of the disengagement of Egypt and, with it, of Syria and Palestine from 'Abbasid rule, is one of the first such polities to affect Palestine.
Ahmad bin Tulun, the son of a Turkic slave who had eventually come to command the Caliph's private guard, had gained the favor of the Caliph al-Musta'in after serving in military campaigns against the Roman Empire in Tarsus.
On returning to Baghdad in 863, the Caliph had presented him with a concubine, Meyyaz, with whom he has Khumarawaih, the son who will eventually succeed him as ruler of Egypt.
The Caliph al-Mu'tazz in 868 had appointed Bayik Bey as the governor of Egypt; Bayik Bey in turn had sent Ahmad ibn Ṭūlūn as his regent.
Ibn Ṭūlūn, on arriving in Egypt in September 868, had found that the existing capital of Egypt, al-Fustat, established in 641 by Amr ibn al-'As, was too small to accommodate his armies.
He had founded a new city to serve as his capital, Madinat al-Qatta'i, or the quartered city.
Al-Qatta'i is laid out in the style of grand cities of Persia and the Eastren Roman Empire, including a large public square, hippodrome, a palace for the governor, and a large ceremonial Mosque of Ibn Tulun, which is named for ibn Ṭūlūn. (The city will be razed in 905; the mosque alone has survived.)
Ibn Ṭūlūn's rule in Egypt had been marked initially by a struggle for control with the existing head of the council of financial affairs, Ibn al-Mudabbir, who reported directly to the Caliph, not to the governor of Egypt, and as such had ignored ibn Ṭūlūn entirely.
Ibn al-Mudabbir was disliked by the local population because of high rates of taxation (particularly against non-Muslim citizens, which comprised over half of Egypt's population) and greed.
Ibn Ṭūlūn had used his influence at the Abbasid court to work against Ibn al-Mudabbir, and had finally been able to have him removed after four years.
Bayik Bey had been murdered around 870, and governorship had passed to Yarjukh al-Turki, father of ibn Tulun's wife, Hatun.
Yarjukh had retained ibn Ṭūlūn as his regent in Egypt, and increased his power by granting him authority over Alexandria and other territories in the region.
Ibn Ṭūlūn had led a campaign against the rebellious governor of Syria, ‘Īsā ibn Shaykh ash-Shaybanī, using the rebellion as a pretext in purchasing a large number of slaves to increase the strength of his army, which forms the basis of his personal authority, and allowing him to amass an army of one hundred thousand men.
The Caliph al-Mu'tamid in 871 had appointed his brother Al-Muwaffaq as governor of Damascus, and his son, later the Caliph Al-Mu'tadid, to succeed Yarjukh as governor of Egypt.
The rebellion of the Zanji, a group of black slaves who seized control of Basra and much of southern Iraq during this decade, has siphoned much of the caliphate's resources away from the provinces.
Ibn Ṭūlūn in 874 had taken advantage of the chaos in Iraq to sever relations with Baghdad and declare independence.
When in 877 Ibn Tulun fails to pay Egypt's full contribution to the 'Abbasid campaign against the Zanj uprising in Iraq, the caliphal government, dominated by the caliph's brother al-Muwaffaq, realizes that Egypt is slipping from imperial control.
Al-Mu'tamid sends armed forces under Musa ibn Bugha to retake control of Egypt, but the attempted invasion is a rout, with most of Musa's army scattering before the larger forces led by ibn Ṭūlūn.
Ibn Ṭūlūn's forces follow and take control of large portions of Syria, but the campaign is cut short when ibn Ṭūlūn has to return to Egypt to deal with a revolt led by his own son, ‘Abbās.