The defeat of the Qarmatians at Hama also opened the way for the Abbasids to recover the provinces of southern Syria and Egypt, held by the Tulunids.
The Tulunid regime had already been weakened by internal strife and the rivalries of the various ethnic groups in the army, which led to the defection of the commander Badr al-Hammami and other senior officers to the Abbasids; the regime was further weakened by the destructive raids of the Qarmatians and its inability to deal with it.
On 24 May 904, Muhammad ibn Sulayman left Baghdad at the head of an army, numbering 10,000 according to al-Tabari, and tasked with recovering southern Syria and Egypt itself from the Tulunids.
His campaign was to be assisted from the sea by a fleet from the frontier districts of Cilicia under Damian of Tarsus.
Damian led a fleet up the river Nile, raided its coasts, and prevented supplies for the Tulunid forces from being ferried over it.

The Abbasid advance was mostly unopposed, and in December, the Tulunid emir Harun ibn Khumarawayh was murdered by his uncles Ali and Shayban.
Shayban took over the reins of the state, but the murder caused further defections to the Abbasids, including the governor of Damascus, Tughj ibn Juff.
In January, the Abbasid army arrived before Fustat, Egypt.
Shayban abandoned his troops during the night, and the Tulunid capital surrendered.
The victorious Abbasids razed the Tulunid-founded capital al-Qata'i with the exception of the great Mosque of Ibn Tulun.
The members of the Tulunid family and their leading adherents were arrested and deported to Baghdad, while their properties were confiscated.
Isa al-Nushari was appointed governor of Egypt.
His tenure was troubled from the start: within months, he was forced to abandon Fustat and flee to Alexandria due to a secessionist rebellion under a certain Ibrahim al-Khalanji.
He was possibly the same person as a certain Muhammad ibn Ali al-Khalij, who also led a pro-Tulunid revolt at about the same time.
Reinforcements arrived from Baghdad under Ahmad ibn Kayghalagh.
Al-Khalanji proved victorious in the first encounter with Ibn Kayghalagh at al-Arish in December 905, but in the end he was defeated and captured in May 906 and brought prisoner to Baghdad.

In 906, al-Muktafi married a daughter of the second Tulunid ruler, Khumarawayh.
She was probably a half-sister of the famous Qatr al-Nada, another daughter of Khumarawayh who was intended for him but ended up being married to his father in 893.
The defeat of the Qarmatians at Hama also opened the way for the Abbasids to recover the provinces of southern Syria and Egypt, held by the Tulunids. The Tulunid regime had already been weakened by internal strife and the rivalries of the various ethnic groups in the army, which led to the defection of the commander Badr al-Hammami and other senior officers to the Abbasids; the regime was further weakened by the destructive raids of the Qarmatians and its inability to deal with it. On 24 May 904, Muhammad ibn Sulayman left Baghdad at the head of an army, numbering 10,000 according to al-Tabari, and tasked with recovering southern Syria and Egypt itself from the Tulunids. His campaign was to be assisted from the sea by a fleet from the frontier districts of Cilicia under Damian of Tarsus. Damian led a fleet up the river Nile, raided its coasts, and prevented supplies for the Tulunid forces from being ferried over it.
The Abbasid advance was mostly unopposed, and in December, the Tulunid emir Harun ibn Khumarawayh was murdered by his uncles Ali and Shayban. Shayban took over the reins of the state, but the murder caused further defections to the Abbasids, including the governor of Damascus, Tughj ibn Juff. In January, the Abbasid army arrived before Fustat, Egypt. Shayban abandoned his troops during the night, and the Tulunid capital surrendered. The victorious Abbasids razed the Tulunid-founded capital al-Qata'i with the exception of the great Mosque of Ibn Tulun. The members of the Tulunid family and their leading adherents were arrested and deported to Baghdad, while their properties were confiscated. Isa al-Nushari was appointed governor of Egypt. His tenure was troubled from the start: within months, he was forced to abandon Fustat and flee to Alexandria due to a secessionist rebellion under a certain Ibrahim al-Khalanji. He was possibly the same person as a certain Muhammad ibn Ali al-Khalij, who also led a pro-Tulunid revolt at about the same time. Reinforcements arrived from Baghdad under Ahmad ibn Kayghalagh. Al-Khalanji proved victorious in the first encounter with Ibn Kayghalagh at al-Arish in December 905, but in the end he was defeated and captured in May 906 and brought prisoner to Baghdad.
In 906, al-Muktafi married a daughter of the second Tulunid ruler, Khumarawayh. She was probably a half-sister of the famous Qatr al-Nada, another daughter of Khumarawayh who was intended for him but ended up being married to his father in 893.
Al-Muktafi