With the full support of Pope Innocent IV during the First Council of Lyon, King Louis IX of France accompanied by his brothers Charles d'Anjou and Robert d'Artois launched the Seventh Crusade against Egypt. The aims of the crusade were to defeat Egypt, destroy the Ayyubid dynasty in Egypt and Syria and recover Jerusalem which the Muslims recaptured in 1244.
The ships entered the Egyptian waters and the troops of the Seventh Crusade disembarked at Damietta in June 1249. Louis IX sent a letter to as-Salih Ayyub, the Ayyubid Sultan of Egypt.  Emir Fakhr ad-Din Yussuf, the commander of the Ayyubid garrison in Damiette retreated to the camp of the Sultan in Ashmum-Tanah  causing a great panic among the inhabitants of Damietta who fled the town leaving the bridge that connected the west bank of the Nile with Damiette intact. After occupying the Egyptian port of Damietta in June 1249, Louis decided to march to Cairo, encouraged by the arrival of reinforcements led by his third brother Alphonse de Poitiers and the news of the death of as-Salih Ayyub. The Franks succeeded in crossing the Canal of Ashmum (known today by the name al-Bahr al-Saghir) and launched a surprise attack against the Egyptian camp in Gideila, two miles away from Al Mansurah. The Egyptian troops in the camp, who were taken by surprise, retreated to Al Mansurah and the crusaders proceeded towards the town. The leadership of the Egyptian force passed to the Mamluk commandants Faris ad-Din Aktai, Baibars al-Bunduqdari who succeeded in reorganizing the retreating troops. Shajar al-Durr who was in full charge of Egypt agreed about the plan of Baibars to defend Al Mansurah. Baibars ordered the opening of a gate to let the knights of the crusaders enter the town. The crusaders rushed into the town that they thought was deserted to find themselves trapped inside. The crusaders were besieged from all directions by the Egyptian forces and the town's population and heavy losses were inflicted upon them. Robert de Artois (brother of Louis IX) who took refuge in a house and William of Salisbury were among those who were killed in Al Mansurah. Only five Knights Templar survived the battle. The crusaders were forced to retreat in disorder to Gideila where they camped within a ditch and wall. Early in the morning of February 11, the Muslim forces launched an offensive against the Franks' camp. For many weeks the Franks were forced to remain in their camp enduring an exhausting guerilla war. Many crusaders were captured and taken to Cairo.