Peruvian War of Independence: The Struggle for Sovereignty (1809–1827)
The Peruvian War of Independence was a pivotal series of military conflicts spanning from 1809 to 1827. As a central theater of the broader Spanish American wars of independence, this struggle led to the dissolution of the Spanish Viceroyalty of Peru and the birth of Peru as an independent state. While the formal declaration of independence occurred in 1821, the path to full sovereignty was a long and bloody process involving internal uprisings and massive international military campaigns.
Key Facts
- Duration: 1809–1827 (18 years).
- Outcome: Patriot victory and the end of Spanish rule in South America.
- Decisive Battle: The Battle of Ayacucho (1824) effectively ended Spanish imperial control.
- Human Cost: Estimated 175,000 to 250,000 deaths.
- Key Figures: José de San Martín, Simón Bolívar, and Antonio José de Sucre.
The Royalist Stronghold: Background and Early Unrest
During the Peninsular War (1807–1814), the Spanish Empire lost its central authority, leading many colonies to establish autonomous juntas (representative councils). However, Peru remained a bastion of royalism. The Viceroy, José Fernando de Abascal y Sousa, successfully suppressed early uprisings and annexed Upper Peru, which benefited Lima's merchants by directing silver trade toward the Pacific.
Despite this stability, economic discrimination against the south and the collapse of the Spanish monarchy in 1808 sparked early resistance. Between 1809 and 1814, several regional movements emerged, including the Tacna rebellion (1811) and the Huánuco rebellion (1812). The latter was a protest against government corruption and policies that disadvantaged indigenous merchants.
The Rebellion of Cuzco (1814–1815)
The most significant early challenge was the Rebellion of Cuzco. This movement was driven by a desire for independent power and a failure of the Spanish administration to implement promised liberal reforms. A key figure in this uprising was Mateo Pumacahua, a former royalist who shifted his allegiance to the national cause. Despite early victories, the rebellion was crushed by 1815, and Pumacahua was executed.

The Liberating Expeditions
By 1815, Peru was firmly under Royalist control, serving as a base for Spanish expeditions against patriots in Chile and Argentina. To break this stronghold, General José de San Martín organized an audacious strategy: crossing the Andes to liberate Chile first, thereby securing a flank for the eventual assault on Peru.
After securing Chile, San Martín launched the Liberating Expedition of Peru. On August 21, 1820, a force of 4,118 soldiers set sail from Valparaíso. They landed in Pisco in September 1820, initiating a campaign that forced the Spanish Viceroy to abandon Lima.

The Declaration of Independence
Following the retreat of the Royalist army to the highlands, General San Martín entered Lima. On July 28, 1821, he officially proclaimed the independence of Peru. However, this declaration did not immediately end the war; the Royalists still controlled the interior and maintained a strong garrison at the Real Felipe Fortress in Callao.

The Transition to Bolívar and Final Victory
Political instability and military setbacks led to a stalemate. Disagreements between San Martín and Simón Bolívar during the Guayaquil Conference resulted in San Martín's withdrawal from Peru in 1822. The responsibility for final liberation fell to Bolívar and his Gran Colombian forces.
Bolívar arrived in Lima in December 1823. His campaign culminated in the Battle of Ayacucho in 1824, where the Patriot forces achieved a decisive victory. This battle effectively ended Spanish imperial rule in South America, though the final Spanish holdouts at the Real Felipe Fortress did not surrender until January 1826.

Full sovereignty was only realized on February 16, 1827, when the last Gran Colombian garrison departed, ending the influence of Bolívar's proposed Federation of the Andes.

Summary of the Conflict
| Category | Patriot Forces | Royalist Forces |
|---|---|---|
| Primary Belligerents | Peruvian Rebels, Protectorate of Peru, Peruvian Republic | Kingdom of Spain, Viceroyalty of Peru |
| Key Allies | Chile, Colombia (Gran Colombia), United Provinces | Iquicha |
| Major Leaders | San Martín, Simón Bolívar, Antonio José de Sucre | José de la Serna, Joaquín de la Pezuela, José de Abascal |
| Key Military Units | Peruvian Army/Navy, British Legions, Army of the Andes | Spanish Imperial Army, Southern Sea Navy |
Aftermath and Legacy
While political ties to Spain were severed, the new republic faced deep internal challenges. Economic dependence on Europe persisted, and the plight of indigenous populations worsened in some respects, with land plunder increasing during the early republican era. It was not until August 27, 1861, that indigenous people were granted open citizenship in Peru.
Frequently Asked Questions
When was Peru's independence officially declared?
Peru's independence was officially proclaimed by José de San Martín on July 28, 1821, in Lima.
What was the significance of the Battle of Ayacucho?
The Battle of Ayacucho in 1824 was the decisive military encounter that secured Peruvian independence and effectively ended Spanish colonial rule across South America.
Why did José de San Martín leave Peru?
San Martín withdrew in 1822 following the Guayaquil Conference, where disagreements with Simón Bolívar over the future governance of the region led to his departure.
Who were the Montoneros?
The Montoneros were Peruvian irregular troops who supported the Patriot cause during the war of independence.
When did Peru achieve full sovereignty from all foreign military presence?
Peru achieved full sovereignty on February 16, 1827, after the final Gran Colombian garrison returned the Real Felipe Fortress to Peruvian control.