Al-Hakim I (Arabic:أبو العباس أحمد الحاكم بأمر الله; full name:, Abū l-ʿAbbās Aḥmad al-Ḥākim bi-amr Allāh ibn Abi 'Ali al-Hasan ibn Abu Bakr; c. 1247 – 19 January 1302) was the secondAbbasid caliph whose seat was inCairo and who was subservient to theMamluk Sultanate. He reigned between 1262 and 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 caliphal-Mustarshid (r. 1118–1135), who had died in 1135. WhenBaghdad fell to the Mongols in 1258, al-Hakim I escaped toDamascus 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 inAleppo, where he was proclaimed. However, the much closer and probably genuine uncle of the last Abbasid caliphal-Musta'sim,Abu'l-Qasim Ahmad al-Mustansir, was proclaimed caliph in Cairo in 1261. Al-Hakim I joined Ahmad al-Mustansir's invasion ofIraq, also submitting to Abu'l-Qasim Ahmad as caliph, but the latter was slain with most of the invaders nearHīt inIraq by theMongols. 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 theMamluk 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 SultanLajin released him in December 1296, allowing him to live in a house in the city and giving him a bigger financial emolument.
Al-Hakim traced his roots back toAl-Mustarshid in the following line: Abu 'Ali al-Hasan, the son ofAbu Bakr, the son ofal-Hasan, the son of 'Ali, son ofal-Mustarshid. His relation with the dynasty was distant and faint.