The Battle of Dayr al-Aqul was fought on 8 April 876, between forces of the Saffarid ruler Ya'qub ibn Laith and the Abbasid Caliphate.
Taking place some 80 km southeast (downstream) of Baghdad, the battle ended in a decisive victory for the Abbasids, forcing Ya'qub to halt his advance into Iraq.
The battle itself took place near a village of the town's district, called Istarband, between Dayr al-Aqul itself and Sib Bani Kuma.
The Turkish military establishment, in an effort to preserve the power of its leaders, began to overthrow any caliph whom they considered unsatisfactory.
[6] In Lower Iraq and Khuzistan, the Zanj Rebellion began in 869 and posed a serious threat to the Abbasid Caliphate in the region.
Al-Mu'tamid's brother, al-Muwaffaq, was the driving force behind this success; he had good relations with the Turkish leaders such as Musa bin Bugha and he gradually gained more and more power until he was the actual administrator of the empire.
[10] The Abbasids were concerned about the threat the Saffarids posed, especially after Ya`qub conquered Fars from Muhammad bin Wasil in 875.
[12] Ya`qub, sensing that the offer was made due to the weakness of the caliph, rejected it and wrote back that he would be advancing to the capital.
[13] For his part, Ya`qub traveled through Khuzistan, during which he gained the defection of a former general of the caliph's, Abi'l-Saj Devdad, and entered Iraq.
[23] The caliph had apparently flooded the lands behind the Saffarids before the battle, and this made a retreat difficult; many men drowned attempting to escape the Abbasid army.
Several political prisoners that Ya`qub had brought with him, such as the Tahirid Muhammad bin Tahir, also fell into Abbasid hands and were freed.
[23] The battle completely halted Ya`qub's advance and put an end to what was arguably a major threat to the Abbasid Caliphate.