The Peninsular War was a military conflict between France and the allied powers of Spain, the United Kingdom, and Portugal for control of the Iberian Peninsula during the Napoleonic Wars. The war began when French and Spanish armies crossed Spain and invaded Portugal in 1807. Then, in 1808, France turned on its ally, Spain. The war lasted until the Sixth Coalition defeated Napoleon in 1814.
The conflict is regarded by some historians as one of the first national wars and is also significant for the emergence of large scale guerrilla warfare (guerrilla means "little war" in Spanish, from which the English language borrowed the word). The French occupation destroyed the Spanish administration, which fragmented into quarrelling provincial juntas. In 1810, a reconstituted national government fortified itself in CÃ¡diz and proved unable to recruit, train, or equip effective armies due to being under siege. British and Portuguese forces secured Portugal, using it as a secure position from which to launch campaigns against the French army while Spanish guerrilleros bled the occupiers. Combined, the regular and irregular allied forces prevented Napoleon's marshals from subduing the rebellious Spanish provinces. To the Spanish the war is known as the Guerra de la Independencia EspaÃ±ola, or Spanish War of Independence, but this name is not often used in English, as Spain had been independent for a long time before the French invasion.
The many years of fighting in Spain gradually wore down France's famous Grande ArmÃ©e. While the French armies were often victorious in battle, their communications and supplies were severely tested and their units frequently cut off, harassed, or overwhelmed by the partisans. The Spanish armies, though repeatedly beaten and driven to the peripheries, could not be stamped out and continued to hound the French relentlessly.
The constant threatening presence of a British force under Arthur Wellesley, which became the most experienced and steady force in the British army, guarded Portugal and campaigned against the French in Spain alongside the reformed Portuguese army. Allied to the British, the demoralized Portuguese army underwent extensive reorganizing, retraining and refitting under the command of British General William Carr Beresford, appointed commander-in-chief of the Portuguese forces by the exiled Portuguese Royal family, and fought as part of a combined Anglo-Portuguese army under Wellington.
In 1812, as Napoleon embarked upon an invasion of Russia which ended in disaster, a combined Allied army under Arthur Wellesley pushed into Spain and took Madrid. Marshal Soult led the exhausted and demoralized French forces in a fighting withdrawal across the Pyrenees and into France over the winter of 1813â€“14.
War and revolution against Napoleon's occupation led to the Spanish Constitution of 1812, later a cornerstone of European liberalism. The burden of war destroyed the social and economic fabric of Portugal and Spain and ushered in an era of social turbulence, political instability and economic stagnation. Devastating civil wars between liberal and absolutist factions, led by officers trained in the Peninsular War, persisted in Iberia until 1850. The cumulative crises and disruptions of invasion, revolution and restoration led to the independence of most of Spain's American colonies and the independence of Brazil from Portugal.