One of the Napoleonic Wars, fought in Spain and Portugal. War was caused by Napoleon’s invasion of Portugal (1807) in order to compel it to accept the Continental System. In 1808 the conflict spread to Spain, whose king was forced to abdicate, Napoleon’s brother Joseph Bonaparte being placed on the throne. In June the Spanish revolted and forced the French to surrender at Baylen, whereupon Joseph fled from Madrid. In August Wellesley (later the Duke of Wellington) landed in Portugal and routed a French force at Vimeiro and expelled the French from Portugal. In November Napoleon personally went to Spain, winning a series of battles, including Burgos, and restoring Joseph to the throne. British hopes of pushing the French out of Spain were dashed in January 1809, after Moore’s retreat to Corunna. Despite his victory at Talavera, Wellesley withdrew to Lisbon. Here he built a strong defensive line, which he centred at Torres Vedras. In 1810 Napoleon sent Massena to reinforce Soult and drive the British into the sea. Massena attempted to lay siege to Torres Vedras, but after four months his army, starved and demoralized, was forced to retreat. Soult, jealous of Massena’s command, was slow in coming to his support, but managed to capture Badajoz. Wellington, who had pursued Massena and defeated him at Almeida, withdrew from invading Spain and turned to face Soult. During 1812 Wellington recaptured Badajoz and after defeating Massena’s replacement, Marmont, at Salamanca, entered Madrid. The following year he defeated Joseph at the decisive Battle of Vitoria. He went on to defeat Soult at Orthez and Toulouse (1814), having driven the French out of Spain.