Family tree of the Abbasid dynasty in the middle and late 9th century
The term "Anarchy at Samarra" refers to the period 861–870 in the history of the Abbasid Caliphate, which was marked by extreme internal instability and the violent succession of four caliphs, who became puppets in the hands of powerful rival military groups. The term derives from the then capital and seat of the caliphal court, Samarra. The "anarchy" began in 861, with the murder of Caliph al-Mutawakkil by his Turkish guards. His successor, al-Muntasir, ruled for six months before his death, possibly poisoned by the Turkish military chiefs. He was succeeded by al-Musta'in. Divisions within the Turkish military leadership enabled Musta'in to flee to Baghdad in 865 with the support of some Turkish chiefs (Bugha the Younger and Wasif) and the Tahirids, but the rest of the Turkish army chose a new caliph in the person of al-Mu'tazz and besieged Baghdad, forcing the city's capitulation in 866. Musta'in was exiled and executed. Mu'tazz was able and energetic, and tried to control the military chiefs and exclude the military from civil administration. His policies were resisted, and in July 869 he too was deposed and killed. His successor, al-Muhtadi, also tried to reaffirm the Caliph's authority, but he too was killed in June 870. With Muhtadi's death and the ascension of al-Mu'tamid, the Turkish faction around Musa ibn Bugha, closely associated with Mu'tamid's brother and regent al-Muwaffaq, became dominant in the caliphal court, ending the "anarchy". Although the Abbasid Caliphate was able to stage a modest recovery in the following decades, the troubles of the "Anarchy at Samarra" inflicted great and lasting damage on the structures and prestige of the Abbasid central government, encouraging and facilitating secessionist and rebellious tendencies in the Caliphate's provinces.