 Following the sack of Baghdad by the Mongols in 1258, he escaped to the Arab tribes in the desert, where he hid out for a couple of years, until the Mamluks drove the Mongols from Syria in 1260.After making his way to Cairo, Mamluk Egypt, al-Mustansir was installed as Caliph there by the Mamluk Sultan Baybars I in 1261.He was sent with an army to the east to recover Baghdad, but was killed in a Mongol ambush near Hīt (modern Iraq) in 1261, and was succeeded by his rather distant Abbasid kinsman (and former rival caliph, having been proclaimed by the ruler of Aleppo) Al-Hakim I.