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 brought 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.