 When al-Muntasir died, the Turkish officers gathered together and decided to install the dead caliph's cousin al-Musta'in on the throne.The new caliph was almost immediately faced with a large riot in Samarra in support of the disenfranchised al-Mu'tazz; the rioters were put down by the military but casualties on both sides were heavy.Al-Musta'in, worried that al-Mu'tazz or al-Mua'yyad could press their claims to the caliphate, first attempted to buy them off and then threw them in prison.