The leadership of the Egyptian force passes to the Mamluk commandants Faris ad-Din Aktai and Baibars al-Bunduqdari, who succeed in reorganizing the retreating troops.
Shajar al-Durr, who is in full charge of Egypt, agrees to Baibars’ plan of defense.
Saladin, the first sultan of the Ayyubid Dynasty, had followed what had by his time constituted a tradition in Muslim military practice by including a slave corps—the Mamluks—in his army in addition to Kurdish, Arab, Turkmen, and other free elements.
His successors have also followed this practice.
As-Salih Ayyub is reputedly the dynasty's largest purchaser of enslaved people, chiefly Turkish, as a means of protecting his sultanate both from Ayyubid rivals and from the crusaders.
Baybars, born in 1223, north of the Back Sea, had been one of a number of Kipchak Turks sold as slaves to the Mongols in about 1242.
Mamluks, who have become the military backbone of most Islamic states, are highly prized, and eventually Baybars had come into the possession of Sultan as-Salih.
Eventually appointed commander of a group of the sultan's bodyguard, Baybars leads the Ayyubid army's defense of the city of al-Mansurah against the crusaders' army led by Louis IX.
As-Salih had also purchased an enslaved man, Qalawun, who was called al-Alfi ['the Thousand-man'] because he was bought for a thousand dinars of gold.
Qalawun will become an important Sultan in the Bahri dynasty of Mamlukes.
Baibars orders the opening of a gate to let the knights of the crusaders enter the town.
The crusaders rush into the town, which they believe to be deserted, only to find themselves trapped inside.
Besieged from all directions by the Egyptian forces and the town's population, the crusaders suffer heavy losses.
Robert de Artois (brother of Louis IX), who had taken refuge in a house, and William of Salisbury are among those killed in Al Mansurah.
Only five Knights Templar survive the battle.
The crusaders are forced to retreat in disorder to Gideila, where they camp within a ditch and wall.