Portugal's refusal to comply with the Continental System led to a punitive French expedition in late 1807. This campaign formed the basis for the Peninsular War, which was to last six years and drain the French Empire of vital resources and manpower. The French attempted to occupy Spain in 1808, but a series of disasters prompted Napoleon to intervene personally later in the year. The 125,000-strong "Grande Armée" marched forward, capturing the fortress of Burgos, clearing the way to Madrid at the Battle of Somosierra, and forcing the Spanish armies to retreat. They then engaged General Sir John Moore's British army, prompting the British to withdraw from the Iberian Peninsula after a heroic action at the Battle of Corunna on January 16, 1809. The campaign was successful, but it would still be some time before the French were able to occupy Southern Spain.