[3] Alarmed by these developments, the Mamluk leaders in Egypt decided to replace Shajar al Durr with the Atabek (commander in chief) Aybak.
He fled back to Damascus, though some of his soldiers who could reach Cairo spread the initial impression inside Egypt that Yusuf had won the battle.
[5][6] In 1253, through mediation of some Emirs, an accord was reached between an-Nasir Yusuf and Aybak which gave the Egyptians control over Gaza, Jerusalem, Nablus, and the coastline of al-Sham.
Some of his Mamluks, among them Baibars al-Bunduqdari and Qalawun al-Alfi, fled to an-Nasir Yusuf in Syria, persuading him to break the accord and invade Egypt.
[7] In 1255, an-Nasir Yusuf sent new forces to the Egyptian border, this time with many of Aktai's Mamluks, among them Baibars al-Bunduqdari, and Qalawun al-Alfi, but he was defeated again.
Louis did, however, send his royal armorer to Damascus to purchase materials to make crossbows, and in 1254, An-Nasir signed a truce with the Crusaders.
Baibars al-Bunduqdari argued that an-Nasir Yusuf should mobilize his army and make preparations to fight the Mongols who were marching towards Syria.
This angered Baibars and his Mamluks who attempted to assassinate an-Nasir Yusuf, but he escaped and fled with his brother to the castle of Damascus, also sending his wife, son, and money to Egypt.
When the news of the sack of Aleppo reached an-Nasir Yusuf, he and his army fled towards Gaza on January 31, stopping at Nablus for several days and leaving a contingent which may have been intended as a rearguard.