Abbasid civil war (865–866) participant Al-Mu'tazz
The Abbasid civil war of 865–866, sometimes known as the Fifth Fitna,  was an armed conflict during the "Anarchy at Samarra" between the rival caliphs al-Musta'in and al-Mu'tazz, fought to determine who would gain control over the Abbasid Caliphate. The war, which lasted for about a year, largely revolved around a prolonged siege of Baghdad and ended with al-Mu'tazz as sole caliph. Al-Musta'in was abandoned by his supporters and forced to abdicate; in spite of a guarantee that his life would be spared, he was executed shortly afterward.
The outcome of the war was a major victory for the Turkic military establishment, which had been responsible for al-Mu'tazz's rise to power, and allowed the Turks to maintain their effective power over the government and military of the caliphate. The partisans of al-Musta'in, namely the Tahirid family, the Arab military factions, and the citizens of Baghdad, continued to be excluded from the politics of the central government after their surrender, although they were allowed to keep the positions they had before the war. Central Iraq, where most of the fighting took place, was devastated by the activities of both sides.
The historian al-Tabari provided a lengthy and detailed account of the war. Other Muslim historians, such as al-Mas'udi and al-Ya'qubi, also mentioned the war in their works.Beginning of hostilities
With two members of the Abbasid dynasty now claiming to be caliph, war became inevitable. On al-Musta'in's side, Muhammad b. 'Abdallah quickly took command of the military effort. He ordered that all food shipments from Baghdad to Samarra be halted, and instructed allies in the Mosul region to do the same. Letters were sent by Muhammad to friendly commanders calling on them to mobilize their forces, and a recruitment drive was initiated in Baghdad. In preparation for a siege, the city was fortified, with the work being completed by February 22. The bridges and canals around al-Anbar were destroyed, flooding the area and hindering any possible enemy troop movements there. Muhammad also wrote to the tax officials throughout the empire, instructing them that their revenues were to be sent to Baghdad instead of Samarra.For his part, al-Mu'tazz wrote to Muhammad, urging him to declare allegiance to him. Soon after, al-Mu'tazz put his brother Abu Ahmad (the later al-Muwaffaq) in command of an army and instructed him to fight against al-Musta'in and Muhammad. The army, consisting of five thousand Turkish and Ferghanan (Faraghinah) soldiers under the leadership of Kalbatikin al-Turki and two thousand North African (Magharibah) soldiers under the leadership of Muhammad b. Rashid al-Maghribi, departed Samarra on February 24. Six days later they arrived in Ukbara, where Abu Ahmad led the prayers in the name of al-Mu'tazz. The Turks and North Africans began looting the area between Ubkara and Baghdad, causing many of the local residents to abandon their estates and fields. On March 10, Abu Ahmad and his army appeared before the Shammasiyah gate on the East side of Baghdad, and the siege of the city began.