Abu’l-ʿAbbās Aḥmad ibn Jaʿfar (; – 14 October 892), better known by his regnal name al-Muʿtamid ʿalā ’llāh (, 'Dependent on God'), was the caliph of the Abbasid Caliphate from 870 to 892. His reign marks the end of the "Anarchy at Samarra" and the start of the Abbasid restoration, but he was largely a ruler in name only. Power was held by his brother al-Muwaffaq, who held the loyalty of the military. Al-Mu'tamid's authority was circumscribed further after a failed attempt to flee to the domains controlled by Ahmad ibn Tulun in late 882, and he was placed under house arrest by his brother. In 891, when al-Muwaffaq died, loyalists attempted to restore power to the Caliph, but were quickly overcome by al-Muwaffaq's son al-Mu'tadid, who assumed his father's powers. When al-Mu'tamid died in 892, al-Mu'tadid succeeded him as caliph. Life The future al-Mu'tamid was a son of Caliph al-Mutawakkil () and a Kufan slave girl called Fityan. His full name was Ahmad ibn Abi Jaʿfar, and was also known by the patronymic Abu'l-Abbas and from his mother as Ibn Fityan. After al-Muhtadi was deposed by the Turkish commanders Bayakbak and Yarjukh, he was selected by the military as his successor and proclaimed Caliph with the regnal name al-Muʿtamid ʿAlā ’llāh on 16 or 19 June 870. On 21 June, al-Muhtadi was executed. Reign and relationship with al-Muwaffaq The accession of al-Mu'tamid brought an end to the turmoils of the "Anarchy at Samarra", which had begun with the murder of al-Mutawakkil in 861. Caliphal authority in the provinces collapsed during that period, with the result that the central government lost effective control over most of the Caliphate outside the metropolitan region of Iraq. In the west, Egypt had fallen under the control of the ambitious Turkish soldier Ahmad ibn Tulun, who also had designs on Syria, while Khurasan and most of the Islamic East had been taken over by the Saffarids under Ya'qub ibn al-Layth, who replaced the Abbasid's loyal governor, Muhammad ibn Tahir. Most of the Arabian peninsula was likewise lost to local potentates, while in Tabaristan a radical Zaydi Shi'a dynasty took power. Even in Iraq, a rebellion of the Zanj slaves had begun and soon threatened Baghdad itself, while further south the Qarmatians were a nascent threat. In addition, al-Mu'tamid's position was undermined from within, as during the coups of the previous years real power had