Al-Musta'in, Abbasid caliph (b. 836)
Abu’l-ʿAbbas Ahmad ibn Muhammad ibn Muhammad (Arabic: أبو العباس أحمد بن محمد بن محمد; 836 – 17 October 866), better known by his regnal title Al-Musta'in (836 – 17 October 866) was the Abbasid caliph from 862 to 866, during the "Anarchy at Samarra". After the death of previous Caliph, Al-Muntasir (who had not appointed any successors), the Turkic military leaders held a council to select his successor. They were not willing to have Al-Mu'tazz or his brothers; so they elected Ahmad ibn Muhammad (أحمد بن محمد), a nephew of Al-Mutawakkil, who took the regnal name Al-Mustaʿin bi-llah (المستعين بالله "he who looks for help to God").
Arab and other troops based in Baghdad, displeased at the choice, attacked the assembly, broke open the prison, and plundered the armory. They were attacked by the Turkic and Berber soldiers, and after some fighting in which many died, succumbed. Baghdad had yet to learn that the Caliphate no longer depended on the opinions of the Arabians, but had passed into other hands.