 He developed strong connections with the Turkish leadership, and this relationship was what possibly prevented al-Mu'tazz from killing him when he was imprisoned the following year.In spite of his imprisonment and subsequent exile, he remained a powerful figure in the government and was a possible contender for the caliphate in 869.From the ascension of al-Mu'tamid in 870, he was the de facto ruler of the empire with the title of al-Muwaffaq, although he never formally became caliph.