Peru’s independence was not a local revolution but a complex, externally driven military campaign.
While many Spanish American colonies revolted early, Peru remained a staunch royalist stronghold until 1820. Independence was not achieved by internal uprising, but through the strategic, amphibious invasions of foreign generals José de San Martín and Simón Bolívar, who finally broke Spanish power in the decisive 1824 Battle of Ayacucho.
The Peruvian War of Independence, spanning 1809 to 1826, was a protracted struggle shaped by Peru's unique status as the Spanish Empire's primary South American base. Unlike other colonies, Peru’s aristocracy and military remained loyal to the crown following the 1808 Napoleonic invasion of Spain. Viceroy José Fernando de Abascal y Sousa effectively suppressed early dissent, including the 1814–1815 Rebellion of Cuzco, and utilized Peru’s resources to launch counter-revolutionary expeditions against patriots in Chile and Argentina.
The tide turned only when external forces intervened. Argentine general José de San Martín, recognizing that Argentine independence remained insecure while royalists held Peru, orchestrated an ambitious seaborne invasion. After liberating Chile, his forces landed in Pisco in 1820. By July 1821, San Martín occupied Lima and declared independence, though he lacked the military strength to clear the royalist-held highlands. His subsequent withdrawal in 1822, following disagreements with Simón Bolívar at the Guayaquil Conference, left the movement in the hands of the northern liberator.
Bolívar’s arrival in 1823 shifted the conflict into its final phase. The decisive military turning point occurred in 1824 with the battles of Junín and Ayacucho, where forces under Antonio José de Sucre shattered the remaining Spanish army. While independence was formally declared on 28 July 1821, true sovereignty was only secured after the final surrender of the Real Felipe Fortress in 1826. The transition to statehood proved volatile, as military caudillos vied for power in a society lacking a tradition of self-government, leading to decades of internal instability.
Source: Peruvian War of Independence