The French capture of Barcelona, 29 February 1808, was one of a series of surprise attacks on Spain’s border fortifications that marked the beginning of the French invasion of Spain. At the start of 1808 France and Spain were officially allies, and engaged in the conquest of Portugal, but Napoleon had already decided to turn his attentions to Spain.
A number of key Spanish border fortifications were captured by trickery, Barcelona amongst them. On 29 February General Lecchi, commanding the French troops then passing through Barcelona, ordered a review of his troops. As his men were passing the gates to the citadel, Lecchi ordered the leading companies to wheel to the left. The Spanish were caught completely by surprise and thousands of French troops were soon inside the citadel. By the end of the day the entire Spanish garrison had been ejected from the fortress, without any fighting. Similar trickery saw the French capture Figueras and Pamplona, while the garrison of San Sebastian surrendered when threatened with an assault.
By the middle of March 1808 Napoleon was in possession of the main fortified positions on the Franco-Spanish border. The Spanish would soon counterattack at Barcelona, which was besieged from August-December 1808, but it would be five years before Allies troops returned to San Sebastian or Pamplona.