By the mid-13th century, the Crusaders became convinced that Egypt, the heart of Islam's forces and arsenal, was an obstacle to their ambition to capture Jerusalem, which they had lost for the second time in 1244. In 1245, during the First Council of Lyon, Pope Innocent IV gave his full support to the Seventh Crusade being prepared by Louis IX, King of France.
The goals of the Seventh Crusade were to destroy the Ayyubid dynasty in Egypt and Syria, and to recapture Jerusalem. The Crusaders asked the Mongols to become their allies against the Muslims, the Crusaders attacking the Islamic world from west, and the Mongols attacking from the east. Güyük, the Great Khan of the Mongols, told the Pope's envoy that the Pope and the kings of Europe should submit to the Mongols.
The ships of the Seventh Crusade, led by King Louis's brothers, Charles d'Anjou and Robert d'Artois, sailed from Aigues-Mortes and Marseille to Cyprus during the autumn of 1248, and then on to Egypt. The ships entered Egyptian waters and the troops of the Seventh Crusade disembarked at Damietta in June 1249. Louis IX sent a letter to as-Salih Ayyub. Emir Fakhr ad-Din Yusuf, the commander of the Ayyubid garrison in Damietta, 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 Damietta intact. The Crusaders crossed over the bridge and occupied Damietta, which was deserted. The fall of Damietta caused a general emergency (called al-Nafir al-Am النفير العام) to be declared, and locals from Cairo and from all over Egypt moved to the battle zone. For many weeks, the Muslims used guerrilla tactics against the Crusader camps; many of the Crusaders were captured and sent to Cairo. As the Crusader army was strengthened by the arrival of Alphonse de Poitiers, the third brother of King Louis IX, at Damietta, the Crusaders were encouraged by the news of the death of the Ayyubid Sultan, as-Salih Ayyub. The Crusaders began their march towards Cairo. Shajar al-Durr, the widow of the dead Sultan, concealed the news for some time and sent Faris ad-Din Aktai to Hasankeyf to recall Turanshah, the son and heir, to ascend the throne and lead the Egyptian army.