Abū ʿAbd Allāh Muḥammad ibn Jaʿfar (; 847 – 16 July 869), better known by his regnal title al-Muʿtazz bi-ʾllāh (, "He who is strengthened by God") was the Abbasid caliph from 866 to 869, during a period of extreme internal instability within the Abbasid Caliphate, known as the "Anarchy at Samarra". Originally named as the second in line of three heirs of his father al-Mutawakkil, al-Mu'tazz was forced to renounce his rights after the accession of his brother al-Muntasir, and was thrown in prison as a dangerous rival during the reign of his cousin al-Musta'in. He was released and raised to the caliphate in January 866, during the civil war between al-Musta'in and the Turkish military of Samarra. Al-Mu'tazz was capable and determined to reassert the authority of the caliph over the Turkish military, but had only limited success. Aided by the vizier Ahmad ibn Isra'il, he managed to remove and kill the leading Turkish generals, Wasif al-Turki and Bugha al-Saghir, but the decline of the Tahirids in Baghdad deprived him of their role as a counterweight to the Turks. Faced with the assertive Turkish commander Salih ibn Wasif, and unable to find money to satisfy the demands of his troops, he was deposed and died of ill treatment a few days later, on 16 July 869. His reign marks the apogee of the decline of the Caliphate's central authority, and the climax of centrifugal tendencies, expressed through the emergence of the autonomous dynasties of the Tulunids in Egypt and the Saffarids in the East, Alid uprisings in Hejaz and Tabaristan, and the first stirrings of the great Zanj Rebellion in lower Iraq. Early life The future al-Mu'tazz was born to the Caliph al-Mutawakkil () from his favourite slave concubine, Qabiha. In 849, al-Mutawakkil arranged for his succession, by appointing three of his sons as heirs and assigning them the governance and proceeds of the empire's provinces: the eldest, al-Muntasir, was named first heir, and received Egypt, the Jazira, and the proceeds of the rents in the capital, Samarra; al-Mu'tazz was charged with supervising the domains of the Tahirid governor in the East; and al-Mu'ayyad was placed in charge of Syria. However, over time the favour of al-Mutawakkil shifted towards al-Mu'tazz. Encouraged by his favourite advisor, al-Fath ibn Khaqan, and the vizier Ubayd Allah ibn Yahya ibn Khaqan, the Caliph began contemplating naming al-Mu'tazz as his first heir, and