Battle at Gaza (1239)
The Battle at Gaza took place on 13 November 1239 as part of the Barons' Crusade. In it, an army led by Theobald I of Navarre was defeated by the Egyptian Ayyubids. Background 
After the ten-year peace treaty between Holy Roman Emperor Frederick II and Ayyubid sultan al-Kamil expired in July 1239, a French Crusader army under Theobald I of Navarre was dispatched in response to the call by pope Gregory IX. The army arrived in Acre in September 1239 where it was reinforced by contingents from the three military orders and the local barons of the Kingdom of Jerusalem. On November 2, the Crusader army moved to Ascalon with about 4,000 men, where they were to rebuild the fortress, securing the southern flank of the kingdom against the Egyptians, in anticipation of an attack on Damascus. The scouts of Peter of Dreux, one of the French commanders, reported a large convoy of herd animals en route to Damascus. Peter left camp with 200 men, ambushing the convoy the next morning. After a brief battle, the convoy's escort was defeated and he returned with the captured herd, where the fresh provisions were badly needed. Passing Jaffa on November 12, news reached them that sultan as-Salih Ayyub had sent an army to Gaza to protect the Egyptian border. Some commanders, among them Amaury of Montfort and Henry of Bar, hurried ahead of the main army to attack the enemy. They were supported by Hugh of Burgundy, Walter of Jaffa, Balian of Sidon, John of Arsuf and Odo of Montbéliard, and the force totaled 400 to 600 men. Theobald, Peter of Dreux and the grand masters of the three orders protested expressly against this plan, arguing that the army should march as a whole to Ascalon to confront the enemy. The rebels did not heed Theobald's warning, and his reminder of their crusader oaths did not help. Expedition to Gaza 
This part of the army rode through the night, passed Ascalon and reached the river that formed a natural border between the kingdom and the sultanate. Walter of Jaffa suggested retreating back to Ascalon, resting the horses there, but the others insisted on advancing. The river crossing was initially secured, allowing the Crusaders to cross the river to camp. They had not chosen well, as they were in a flat terrain surrounded by sand dunes. Further, they failed to provide the necessary security for their stop in enemy territory, with no patrols or sentry posts on the surrounding dunes. The Egyptian commander Rukn al-Din al-Hijawi proceeded more carefully. Soon his scouts had spotted the Crusader camp and Egyptian archers and slingers occupied the surrounding dunes. The men of Walter of Jaffa were the first to discover the Ayyubid troops, and he called his men to arms and assembled the leaders in the council of war. Walter and Hugo of Burgundy were for returning to Ascalon; Amaury of Montfort and Henry of Bar were against it, fearing an ambush. In response, Walter, Hugo and most of the other leaders left for Ascalon. The Battle 
The remaining Crusaders faced the Egyptians for battle. Amaury ordered his crossbowmen to fire, eventually running out of crossbow bolts. Noticing a deep, narrow passage between two dunes that might provide cover, the knights rushed forward and dispersed. In the meantime the Egyptian cavalry had also arrived. Instead of storming the heavily armored knights in the narrow passage, they began a mock attack and fake retreat. The Franks fell into the trap and rode after the retreating Egyptians in a disorderly manner, leaving the passage. The sanctuary then was closed and the Egyptian cavalry surrounded the knights. Many were killed, including Henry of Bar. Amaury, dozens of other nobles and many soldiers were taken prisoner, to be held for over 17 months. Aftermath 
When the main army arrived in Ascalon, they met Walter of Jaffa and Hugo of Burgundy who reported on the desperate situation of at Gaza. The main army, led by the Teutonic Knights, then advanced towards Gaza. Soon they met fleeing refugees and their Muslim pursuers. The Egyptian army was not strong enough to take on the entire Crusader army and retreated to Gaza while the Franks occupied the corpse-strewn battlefield. Theobald intended to pursue the enemy army, but refrained from doing so when Armand de Lavoie pointed out that the Muslims would kill their prisoners in the event of an attack. This battle and the previous encounter under Peter of Dreux were to remain the only battles of the Barons' Crusade. In August 1240, Richard of Cornwall, leading his own force of Crusaders, came to an understanding with al-Salih Ayyub, who was in the civil war with his uncle al-Salih Ismail. On 23 April 1241, they exchanged Muslim prisoners with Christian captives. The Crusade ended with Richard's departure on 3 May 1241. References 

Barons' Crusade
Wars involving the Ayyubid Sultanate
Wars involving France
1230s conflicts
1230s in the Ayyubid Sultanate