(180814) Part of the Napoleonic Wars , fought on the Iberian Peninsula.
After French forces occupied Portugal (1807) and Napoleon installed his brother Joseph Bonaparte as king of Spain (1808), a rebellion in Madrid began what was called in Spain "the War of Independence," and insurrections soon erupted in other cities. By 1810 the French overcame the Spanish rebels in Madrid and elsewhere in Spain. Meanwhile, the British under the future duke of Wellington landed in Portugal (1808), where they fought the French in inconclusive campaigns until 1812. After Napoleon withdrew French forces to bolster his invasion of Russia, Wellington began his gradual advance into Spain. The British victory at the Battle of Vitoria (1813) and their march into southwestern France forced the French to withdraw from Spain and to reinstall Ferdinand VII as king (1814).