The great turmoil now flared up in Iraq. The Turks turned against al-Mustaʿin, so he took fright and withdrew to Baghdad, settling on the western side of the city with his lieutenant Ibn Ṭāhir. The Turks in Sāmarrāʾ thereupon reached an agreement; they sent envoys to apologize and ask him to return, but he refused. Angered, they went to the prison, brought out al-Muʿtazz bi’Llāh, swore allegiance to him, and deposed al-Mustaʿin. They justified their action with a doubtful pretext, claiming that al-Mutawakkil had appointed al-Muʿtazz heir after al-Muntaṣir.
Al-Muʿtazz equipped his brother Abū Aḥmad to wage war against al-Mustaʿin, while al-Mustaʿin and Ibn Ṭāhir readied the city for a siege and repaired the walls. The people of Baghdad armed themselves for the fight, catapults were set up, the struggle grew serious, and the ordeal dragged on for months. Casualties mounted, famine became severe, and several engagements took place, in one of which two thousand soldiers from al-Muʿtazz’s forces were killed. At length the Baghdadis grew weak, humiliated, hungry, and destitute (1)—how patient they proved in the face of evil and upheaval!
The Muʿtazz faction gained strength, and Ibn Ṭāhir began covert correspondence with al-Muʿtazz. Al-Mustaʿin’s power structure collapsed—for it depended on Ibn Ṭāhir—and the populace confronted him, so he withdrew to al-Ruṣāfah. The people then sought a settlement, and al-Mustaʿin was deposed; Judge Ismāʿīl and others oversaw the process under binding conditions. He consented to abdicate at the beginning of 252 AH, witnesses being summoned to the act.
After his abdication he was conveyed under guard to Wāsiṭ, where he was held for nine months. He was then transferred to Sāmarrāʾ and slain at Qādisiyyat Sāmarrāʾ on the third of Shawwāl of that same year (2).
Another report says he was killed two days before the end of Ramadan, at the age of thirty-one years and a few days.
It is related that al-Muʿtazz sent Sāʿīd the chamberlain to him. When al-Mustaʿin saw him, he knew his fate was sealed, wept, and said, “It is over …"