Al-Hakim I

Al-Hakim I () Abu al-'Abbas Ahmad ibn Abi 'Ali al-Hasan held the position of the second Caliph of Cairo for the Mamluk Sultanate between 1262 to 1302. 
"Al-Hakim I" held the position of the Caliph of Cairo from 1262 to 1302. He was an alleged great-great-great grandson of the Abbasid Caliph al-Mustarshid, who had died in 1135. When Baghdad fell to the Mongols in 1258, al-Hakim I escaped to Damascus where he befriended the Arab tribal chief 'Isa ibn al-Muhanna, who tried to set him up as caliph, but in the confusion surrounding the Mongol invasion of Syria in 1259-1260, he ended up in Aleppo, where he was proclaimed. However, the much closer and probably genuine uncle of the last Abbasid caliph al-Musta'sim, Ahmad al-Mustansir, was proclaimed caliph in Cairo in 1261. Al-Hakim I joined Ahmad al-Mustansir's invasion of Iraq, also submitting to al-Mustansir as caliph, but the latter was slain with most of the invaders near Hīt in Iraq by the Mongols. Only about fifty troops escaped with al-Hakim, who, making his way back to Cairo and after a careful scrutiny of his genealogical claim to be an Abbasid, was proclaimed caliph in succession to al-Mustansir in 1262. Since al-Hakim's connection with the Abbasids is distant and faint, it cannot now be known whether he was really from that family as he claimed or not. In any case, al-Hakim I had no further adventures, served as a legitimating and ceremonial functionary for the Mamluk sultans in Cairo, reigned for thirty-nine years, and became the progenitor of all the subsequent Abbasid caliphs of Cairo, whether he was really an Abbasid or not. Although he was kept in office after 1262, the Mamluk sultans kept him as a virtual prisoner in the citadel, until Sultan Lajin released him in December 1296, allowing him to live in a house in the city and giving him a bigger financial emolument.