the whole of the army was rounded up and led into captivity. The Egyptians were unprepared for the large number of prisoners taken, comprising most of Louis' force. The infirm were executed immediately and several hundred were decapitated daily. Louis and his commanders were moved to Mansurah, and negotiations for their release commenced. The terms agreed to were harsh. Louis was to ransom himself by the surrender of Damietta and his army by the payment of a million bezants (later reduced to 800,000). Latin patriarch Robert of Nantes went under safe-conduct to complete the arrangements for the ransom. Arriving in Cairo, he found Turanshah dead, murdered in a coup instigated by his stepmother Shajar al-Durr. On 6 May, Geoffrey of Sergines handed Damietta over to the Moslem vanguard. Many wounded soldiers had been left behind at Damietta, and contrary to their promise, the Muslims massacred them all. In 1251, the Shepherds' Crusade, a popular crusade formed in 1251, with the objective to free Louis, engulfed France. After his release, Louis went to Acre where he remained until 1254. This is regarded as the end of the Seventh Crusade. The Last Crusades After the defeat of the Crusaders in Egypt, Louis remained in Syria until 1254 to consolidate the crusader states. A brutal power struggle developed in Egypt between various Mamluk leaders and the remaining weak Ayyubid rulers. The threat presented by an invasion by the Mongols led to one of the competing Mamluk leaders, Qutuz, seizing the sultanate in 1259 and uniting with another faction led by Baibars to defeat the Mongols at Ain Jalut. The Mamluks then quickly gained control of Damascus and Aleppo before Qutuz was assassinated and Baibers assumed control. Between 1265 and 1271, Baibars drove the Franks to a few small coastal outposts. Baibars had three key objectives: to prevent an alliance between the Latins and the Mongols, to cause dissension among the Mongols (particularly between the Golden Horde and the Persian Ilkhanate), and to maintain access to a supply of slave recruits from the Russian steppes. He supported Manfred of Sicily's failed resistance to the attack of Charles and the papacy. Dissension in the crusader states led to conflicts such as the War of Saint Sabas. Venice drove the Genoese from Acre to Tyre where they continued to trade with Egypt. Indeed, Baibars negotiated free passage for the Genoese with MichaelVIII Palaiologos, Emperor of Nicaea,