Al-Hakim I

Al-Hakim I (الحاكم بأمر الله الأول; full name: Abu al-'Abbas Ahmad ibn Abi 'Ali al-Hasan ibn Abu Bakr; c. 1247 – 19 January 1302) was the second Abbasid caliph whose seat was in Cairo and who was subservient to the Mamluk Sultanate. He reigned between 1262 and 1302.

Life
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 (r. 1118–1135), 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, Abu'l-Qasim Ahmad al-Mustansir, was proclaimed caliph in Cairo in 1261. Al-Hakim I joined Ahmad al-Mustansir's invasion of Iraq, also submitting to Abu'l-Qasim Ahmad 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 determined 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 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.

Family tree
Al-Hakim traced his roots back to Al-Mustarshid in the following line: Abu 'Ali al-Hasan, the son of Abu Bakr, the son of al-Hasan, the son of 'Ali, son of al-Mustarshid. His relation with the dynasty was distant and faint.