Peninsular War: The British defeat the French at the Battle of La Coruña.

The Battle of Corunna (or A Corua, La Corunna, La Corua or La Corogne), in Spain known as Battle of Elvia, took place on 16 January 1809, when a French corps under Marshal of the Empire Jean de Dieu Soult attacked a British army under Lieutenant-General Sir John Moore. The battle took place amidst the Peninsular War, which was a part of the wider Napoleonic Wars. It was a result of a French campaign, led by Napoleon, which had defeated the Spanish armies and caused the British army to withdraw to the coast following an unsuccessful attempt by Moore to attack Soult's corps and divert the French army.

Doggedly pursued by the French under Soult, the British made a retreat across northern Spain while their rearguard fought off repeated French attacks. Both armies suffered extremely from the harsh winter conditions. Much of the British army, excluding the elite Light Brigade under Robert Craufurd, suffered from a loss of order and discipline during the retreat. When the British eventually reached the port of Corunna on the northern coast of Galicia in Spain, a few days ahead of the French, they found their transport ships had not arrived. The fleet arrived after a couple of days and the British were in the midst of embarking when the French forces launched an attack. They forced the British to fight another battle before being able to depart for England.In the resulting action, the British held off French attacks until nightfall, when both armies disengaged. British forces resumed their embarkation overnight; the last transports left in the morning under French cannon fire. But the port cities of Corunna and Ferrol, as well as northern Spain, were captured and occupied by the French. During the battle, Sir John Moore, the British commander, was mortally wounded, dying after learning that his men had successfully repelled the French attacks.

The Peninsular War (1807–1814) was the military conflict fought in the Iberian Peninsula by Spain, Portugal, and the United Kingdom against the invading and occupying forces of the First French Empire during the Napoleonic Wars. In Spain, it is considered to overlap with the Spanish War of Independence. The war began when the French and Spanish armies invaded and occupied Portugal in 1807 by transiting through Spain, and it escalated in 1808 after Napoleonic France had occupied Spain, which had been its ally. Napoleon Bonaparte forced the abdications of Ferdinand VII and his father Charles IV and then installed his brother Joseph Bonaparte on the Spanish throne and promulgated the Bayonne Constitution. Most Spaniards rejected French rule and fought a bloody war to oust them. The war on the peninsula lasted until the Sixth Coalition defeated Napoleon in 1814, and it is regarded as one of the first wars of national liberation and is significant for the emergence of large-scale guerrilla warfare.

The war began in Spain with the Dos de Mayo Uprising on 2 May 1808 and ended on 17 April 1814 with the restoration of Ferdinand VII to the monarchy. The French occupation destroyed the Spanish administration, which fragmented into quarrelling provincial juntas. The episode remains as the bloodiest event in Spain's modern history, doubling in relative terms the Spanish Civil War.A reconstituted national government, the Cortes of Cádiz—in effect a government-in-exile—fortified itself in the secure port of Cádiz in 1810, but could not raise effective armies because it was besieged by 70,000 French troops. British and Portuguese forces eventually secured Portugal, using it as a safe position from which to launch campaigns against the French army and provide whatever supplies they could get to the Spanish, while the Spanish armies and guerrillas tied down vast numbers of Napoleon's troops. By restricting French control of territory, the combined allied forces, both regular and irregular, prevented Napoleon's marshals from subduing the rebellious Spanish provinces, and the war continued through years of stalemate.The British Army, under then Lt. Gen. Sir Arthur Wellesley, later the 1st Duke of Wellington, guarded Portugal and campaigned against the French in Spain alongside the reformed Portuguese army. The demoralized Portuguese army was reorganized and refitted under the command of Gen. William Beresford, who had been appointed commander-in-chief of the Portuguese forces by the exiled Portuguese royal family, and fought as part of the combined Anglo-Portuguese Army under Wellesley.

In 1812, when Napoleon set out with a massive army on what proved to be a disastrous French invasion of Russia, a combined allied army under Wellesley pushed into Spain, defeating the French at Salamanca and taking the capital Madrid. In the following year Wellesley scored a decisive victory over King Joseph Bonaparte's army in the Battle of Vitoria. Pursued by the armies of Britain, Spain and Portugal, Marshal Jean-de-Dieu Soult, no longer getting sufficient support from a depleted France, led the exhausted and demoralized French forces in a fighting withdrawal across the Pyrenees during the winter of 1813–1814.

The years of fighting in Spain were a heavy burden on France's Grande Armée. While the French were victorious in battle, they were eventually defeated, as their communications and supplies were severely tested and their units were frequently isolated, harassed or overwhelmed by partisans fighting an intense guerrilla war of raids and ambushes. The Spanish armies were repeatedly beaten and driven to the peripheries, but they would regroup and relentlessly hound and demoralize the French troops. This drain on French resources led Napoleon, who had unwittingly provoked a total war, to call the conflict the "Spanish Ulcer".War and revolution against Napoleon's occupation led to the Spanish Constitution of 1812, promulgated by the Cortes of Cádiz, 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, increased 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, which remained a monarchy, after severing ties with Portugal.