challengers to retain control of Baghdad, but he died in August 945 and was replaced by his secretary Ibn Shirzad, who did not enjoy the same authority with the troops. Ibn Shirzad's weakness was quickly exploited by the Caliph, who assumed a new title, that of 'Rightful Imam' (), to bolster his claim to Islamic leadership. He also took measures against Shi'a followers, imprisoning the Shi'a leader al-Shafi'i, and dismissed corrupt judges, including the chief , Muhammad ibn Abi al-Shawarib. Finding himself unable to control affairs, Ibn Shirzad requested the aid of the Hamdanid Nasir al-Dawla from Mosul. Just then the governor of Wasit surrendered to the Buyid leader Ahmad ibn Buya, and joined him in his march on Baghdad. Left leaderless, the Turkic troops of the capital made no preparations to resist. Ibn Shirzad and the Caliph went into hiding, emerging only when the Turks had left the city to join the Hamdanids. When a messenger of Ahmad ibn Buya arrived at the capital, al-Mustakfi pretended to be delighted at their arrival. Downfall and death The Buyid forces entered Baghdad without opposition, and on 21 December, al-Mustakfi was forced to recognize the Buyids' authority. Ahmad was granted the honorific title of Mu'izz al-Dawla ("Magnifier of the Dynasty"); similar titles were granted to his two brothers, Hasan (Rukn al-Dawla, "Pillar of the Dynasty") and Ali (Imad al-Dawla, "Prop of the Dynasty"). In accordance with the family-based Buyid system, the title of passed not to Mu'izz al-Dawla, but to the oldest brother, Imad al-Dawla, who was the chief Buyid emir. As al-Mustakfi was now under Buyid control, the Hamdanids promptly stopped recognizing him as caliph, and proclaimed their allegiance to the former caliph al-Muttaqi. Al-Mustakfi himself reportedly intrigued with some of the Buyids' Daylamite officers against Mu'izz al-Dawla. As a result, he was deposed on 29 January 946 (or 9 March, according to other accounts) on Mu'izz al-Dawla's orders. The reason given for al-Mustakfi's deposition was likely a mere pretext; historian Harold Bowen called the act a "political necessity" that also was highly symbolic, making clear where power now resided. Although the Buyids and their followers were Shi'a sympathizers, Mu'izz al-Dawla preferred not to risk installing a Shi'a caliph (or recognizing the Isma'ili Fatimid caliphs), for fear of his men obeying the caliph rather than him. Instead, he raised al-Fadl, who emerged from hiding, to the caliphate with the name al-Muti.