Abu’l-Qāsim ʿAbdallāh ibn Ali (; 908 – September/October 949), better known by his regnal name al-Mustakfī bi’llāh () was the Abbasid caliph in Baghdad from 944 to 946. Al-Mustakfi was a younger son of Caliph al-Muktafi, and hence a rival to the line of Caliph al-Muqtadir that reigned in 908–944, a period during which the Abbasid Caliphate nearly collapsed, and caliphs became puppets at the hands of rival warlords. Al-Mustakfi himself was installed on the throne by Tuzun, a Turkish general who deposed and blinded the previous caliph, al-Muttaqi. In the power vacuum left after Tuzun's death in August 945, al-Mustakfi tried to regain some of his freedom of action, initiating anti-Shi'a measures, but the same vacuum allowed the Buyids to capture Baghdad. Al-Mustakfi was forced to recognize the Buyids as legitimate rulers and awarded them regnal titles, but was soon accused of plotting against them and deposed in January (or March) 946. He spent the final years of his life in prison. His son attempted to claim the caliphate in , but failed. Biography Early life and character Al-Mustakfi was born on 11 November 908, a son of Caliph al-Muktafi () and a Greek concubine, Ghusn. He is described by the chroniclers as being fond of sports and games, partial to (fermented drinks). He is said to have been sympathetic to the Shi'a, and maintained close contact with the (urban vagabonds and fighters) of Baghdad. His ties to the , and his participation in 'vulgar' games was an affront to the more pious sections of society. Background: the decline of the Abbasid Caliphate By the 930s, the once mighty Abbasid Caliphate had fallen into decline: its outlying provinces lost to local dynasts, its finances in ruin, and warlords—the Hamdanids of Mosul, the Baridis of Basra, the Buyids of western Iran, as well as various military strongmen—competing for control of the very capital of the caliphate, Baghdad, and the title of (commander-in-chief), which carried with it the de facto control over the Abbasid government. At the same time, the Abbasid dynasty itself was consumed by rivalries and infighting, chiefly between the descendants of al-Muktafi on the one hand and those of his brother and successor, al-Muqtadir (), on the other. Under al-Muqtadir's son al-Radi (), three of al-Muktafi's sons were executed or imprisoned, while the Caliph faced challenges from two of his own brothers and other collateral lines of Abbasid