The Battle of Bailén was fought in 1808 between the Spanish Army of Andalusia, led by Generals Francisco Castaños and Theodor von Reding, and the Imperial French Army's II corps d'observation de la Gironde under General Pierre Dupont de l'Étang. This battle was the first open-field defeat of a Napoleonic army. The heaviest fighting took place near Bailén (sometimes anglicized Baylen), a village by the Guadalquivir river in the Jaén province of southern Spain. In June 1808, following the widespread uprisings against the French occupation of Spain, Napoleon organized French units into flying columns to pacify Spain's major centres of resistance. One of these, under General Dupont, was dispatched across the Sierra Morena and south through Andalusia to the port of Cádiz where a French naval squadron lay at the mercy of the Spanish. The Emperor was confident that with 20,000 men, Dupont would crush any opposition encountered on the way, despite most of them being inexperienced new recruits. Events proved otherwise when Dupont and his men stormed and plundered Córdoba in July. General Castaños, commanding the Spanish field army at San Roque, and General von Reding, Governor of Málaga, travelled to Seville to negotiate with the Seville Junta—a patriotic assembly committed to resisting the French incursions—and to turn the province's combined forces against the French. Upon learning of the approach of a larger Spanish force, Dupont fell back to the north of the province. Sick and burdened with wagons of loot, he unwisely decided to await reinforcements from Madrid; his messengers were all intercepted and killed however and a French division under General Dominique Vedel, dispatched by Dupont to clear the road to Madrid, became separated from the main body. Between 16 and 19 July, Spanish forces converged on the French positions stretched out along villages on the Guadalquivir and attacked at several points, forcing the confused French defenders to shift their divisions this way and that. With Castaños pinning Dupont downstream at Andújar, Reding successfully forced the river at Mengibar and seized Bailén, interposing himself between the two wings of the French army. Caught between Castaños and Reding, Dupont attempted in vain to break through the Spanish line at Bailén in three bloody and desperate charges, suffering 2,000 casualties, including himself wounded. With his men short of supplies and without water in sweltering heat, Dupont entered into talks with the Spanish. Vedel finally arrived, but too late. In