Way back in the year 876 AD the Abbasid Caliphate held control over vast amounts of territory in the Middle East and North Africa. The Abbasid Caliphate was the third of the Islamic caliphates to succeed the Islamic prophet Muhammad. On April 8th of 876 Ad the caliphate was at perhaps its lowest moment in their history, after the assassination of caliph al-Mutawakkil in 861 the caliphate was in a state of turmoil. On the 8th of April the Saffarids that ruled over parts of Eastern Iran moved towards the heart of the Abbasid Caliphate the capital Samarra defeating governors and capturing cities along the way.
The battle took place at Baghdad which had been the capital of the Abbasid Caliphate at different points in the empire’s history, the Abbasids needed to stop the Saffarids who had gained momentum and were closing in on a key city in the empire. The leader of the Saffarids Ya`qub ibn Laith rejected notions of peace including right before the battle on the 8th, the Saffarids saw weakness from the Abbasids due to the tumultuous time the empire was having including going through a number of caliphs in quick succession after the assassination of al-Mutawakkil in 861.
The Saffarids had an army of 10,000 which was smaller than the Abbasid army, the advantage was firmly with the Abbasids who were also fighting in very familiar territory. The fighting took place at Dayr al-‘Aqul which was south of Baghdad. The fight raged for the majority of the day, and both sides took heavy losses including numerous commanders from both the Saffarids and the Abbasids. During the evening of the 8th reinforcements arrived to support the Abbasid army, this was coupled with a diversion at the rear of the Saffarid army with an assault from the Tigris river and the burning of the Saffarids baggage train.The diversions aswell as the numerical advantage in favour of the Abbasids eventually led to the Saffarids having to retreat from the battle, this included the Saffarids leader Ya`qub ibn Laith.
The defeat here completely halted Ya`qub’s advances into Iraq and ended what was a major threat to the Abbasid Caliphate, after this defeat Ya`qub made no further attempts against the caliphate and the Abbasids were able to regain some measure of control in the invaded regions.