on all fronts, since he commanded the loyalty of the army. In April 876, al-Muwaffaq and Musa ibn Bugha defeated Ya'qub ibn al-Layth's attempt to capture Baghdad at the Battle of Dayr al-'Aqul and saved the Caliphate from collapse. The repulse of the Saffarids then allowed the Abbasids to concentrate their resources in suppressing the Zanj Revolt in the south. The Zanj rebels had managed to capture much of lower Iraq, and inflicted several defeats on the Abbasid troops. In 879, al-Muwaffaq's son Abu'l-Abbas, the future Caliph al-Mu'tadid (), was given the command against the Zanj, and in the next year, al-Muwaffaq himself joined the campaign. In a succession of engagements in the marshes of southern Iraq, the Abbasid forces drove back the Zanj towards their capital, Mukhtara, which fell in August 883. Ibn Tulun and al-Mu'tamid's attempted flight to Egypt At the same time, al-Muwaffaq also had to contend with the ambitions of Ahmad ibn Tulun in the western provinces. Ibn Tulun and the Abbasid regent fell out in 875/6, on the occasion of a large remittance of revenue from Egypt to the central government. Counting on the rivalry between the Caliph and his over-mighty brother to maintain his own position, Ibn Tulun forwarded a larger share of the taxes to al-Mu'tamid instead of al-Muwaffaq: 2.2 million gold dinars went to the Caliph and only 1.2 million dinars to his brother. Al-Muwaffaq, who in his fight against the Zanj considered himself entitled to the major share of the provincial revenues, was angered by this, and by the implied machinations between Ibn Tulun and his brother. Al-Muwaffaq nominated Musa ibn Bugha as governor of Egypt and sent him with troops to Syria, but a lack of funds led to the expedition's failure before even reaching Egypt. In a public gesture of support for al-Mu'tamid and opposition to al-Muwaffaq, Ibn Tulun assumed the title of "Servant of the Commander of the Faithful" (mawlā amīr al-muʾminīn) in 878. With the support of al-Mu'tamid, in 877/8 Ibn Tulun managed to be assigned responsibility for the entirety of Syria and the Cilician frontier zone (Thughur) with the Byzantine Empire. In 881, Ibn Tulun added his own name to coins issued by the mints under his control, along with those of the Caliph and heir apparent, al-Mufawwad. In the autumn of 882, the Tulunid general Lu'lu' defected to the Abbasids, and the cities of the