With 18,000 men, Wellington captured the French-garrisoned city of San Sebastián under Brigadier-General Louis Emmanuel Rey after two sieges that lasted from 7 July to 25 July (While Wellington departed with sufficient forces to deal with Marshal Soult's counter-offensive, he left General Graham in command of sufficient forces to prevent sorties from the city and any relief getting in); and from 22 August to 31 August 1813. The British incurred heavy losses during assaults. The city in turn was sacked and burnt to the ground by the Anglo-Portuguese: see Siege of San Sebastián. Meanwhile, the French garrison retreated into the Citadel, which after a heavy bombardment their governor surrendered on 8 September, with the garrison marching out the next day with full military honours. Upon the day that San Sebastián fell Soult attempted to relieve it, but in the battles of Vera and San Marcial was repulsed by the Spanish Army of Galicia under General Manuel Freire. The Citadel surrendered on 9 September, the losses in the entire siege having been about—Allies 4,000, French 2,000. Wellington next determined to throw his left across the river Bidassoa to strengthen his own position, and secure the port of Fuenterrabia.