After a series of grievous blunders by Dupont and Vedel, Dupont surrendered the survivors of his 10,000 men after the Battle of Bailén on 20 July 1808. Even though Vedel was not surrounded, he meekly surrendered his division a few days later. Cassagne argued forcefully against surrendering but he was not in a position to change the terms of the capitulation. His opposition reached the ears of Napoleon so Bailén did not blight his career. Cassagne and the other generals were immediately released, but the Spanish violated the terms of the surrender. They were supposed to repatriate the captured troops back to France. Instead they held them until 1814 under terrible conditions and half of the men died. Dupont, Vedel, Armand Samuel de Marescot, Théodore Chabert and François Marie Guillaume Legendre d'Harvesse were imprisoned by Napoleon for nine months, then released. Dupont was sent back to prison in 1812–1814, but the others were pardoned or put on half-pay.