Beginning in 861, the Abbasid Caliphate was weakened by a period of severe disorder known as the Anarchy at Samarra, during which the central government in Abbasid Samarra was paralyzed by a struggle between the caliphs and the military establishment for control of the state. Throughout the 860s the various factions in the capital were distracted by this conflict, which resulted in the deaths of several caliphs, army commanders and bureaucrats, the outbreak of multiple troop riots, a damaging civil war in 865–866, and the virtual bankruptcy of the government.