On 26 June 1808, Vedel's column defeated Valdecaños' detachment of Spanish regulars and guerrillas with six guns blocking the mountain pass of Puerta del Rey at Despeñaperros.
Leaving a battalion at Puerta del Rey, Vedel met up with Dupont at La Carolina the following day, reestablishing military communications with Madrid after a month of disruption.
Around midday on 16 July, Vedel moved from Guarromán to Bailén bringing up Legrange's cuirassiers, Cassagne's legion, and Dufour's brigade for an attack on Reding's troops.
[2] Two Spanish officers approached Vedel under a flag of truce, announcing that Dupont had been badly defeated and had proposed to suspend arms; the Frenchman replied, "Tell your General, that I care nothing about that, and that I am going to attack him.
Following the capitulation of the French troops at the Battle of Bailén, Vedel, like the other high-ranking officers who were fortunate enough be returned to France, was sent before a court-martial, deprived of his rank and title, and imprisoned.