[1821–1845] War of Independence and Early Republic
The year 1821 opens in Lima, a city holding its breath. For three centuries, it was the opulent heart of Spanish power in South America, the 'City of Kings'. Now, its cobbled streets, usually echoing with the promenades of viceroys and the tolling of church bells, buzz with a nervous energy. On July 28th, from a balcony in the Plaza de Armas, the Argentine general José de San Martín declares Peru’s freedom. “From this moment on,” he proclaims, “Peru is free and independent, by the general will of the people and the justice of its cause that God defends.” The crowds erupt, but the celebration is a fragile veneer over a deeply fractured society. Independence, for now, is a concept largely confined to the capital and the ambitions of the criollo elite—the wealthy, American-born descendants of Spaniards. They longed to shrug off the authority of Madrid, not to dismantle the social pyramid, but to place themselves at its apex. For the vast indigenous populations in the Andes, the mestizos in the towns, and the thousands of enslaved Afro-Peruvians toiling on coastal plantations, the word ‘freedom’ carried a different, more uncertain weight. Their lives, governed by tribute, forced labor, and servitude, were yet to see any meaningful change.
The initial euphoria of independence soon gave way to the harsh reality that the war was far from over. Royalist forces remained entrenched in the formidable Sierra highlands. San Martín, naming himself “Protector of Peru,” struggled to consolidate the new state. His vision, a constitutional monarchy with a European prince, clashed violently with the republican ideals sweeping the continent. This set the stage for the arrival of the second great liberator of South America: Simón Bolívar. The two titans met in the famous, secretive Guayaquil Conference of 1822. No minutes were kept, but what emerged was clear: only one man could lead the final charge. The cautious San Martín, perhaps weary of bloodshed or outmaneuvered politically, mysteriously withdrew from Peru and, ultimately, from public life, leaving the field to the charismatic and ferociously driven Bolívar. With his trusted general, Antonio José de Sucre, Bolívar launched the final campaigns. The high-altitude plains of Junín and Ayacucho, in 1824, were the settings for the last, decisive battles. The clash of sabers and the thunder of cavalry charges at over 12,000 feet finally shattered Spanish power in South America forever. The continent was free, but Peru was exhausted, indebted, and politically orphaned.
With the liberators gone, Peru was left to invent itself. The dream of a just republic quickly soured into a nightmare of instability. The nation’s economy, once the source of the Spanish Empire’s immense silver wealth, was in ruins. The great mines of Cerro de Pasco were flooded and abandoned, haciendas were destroyed, and the national treasury was empty. To fund the war, Peru had accepted huge loans from Britain, swapping one colonial master for a new, economic one. The social promises of the revolution proved hollow. The hated indigenous tribute was abolished in name only, quickly reinstated as the 'contribución de indígenas', becoming the main source of state income. The institution of slavery, though its decline had begun, would not be fully abolished until 1854. The criollo landowners simply stepped into the shoes of the Spanish, and the rigid colonial `casta` system, though officially gone, left a long shadow of racial and social hierarchy that defined the new republic.
The political landscape was a violent whirlwind. This was the age of the 'caudillos'—military strongmen with regional power bases and national ambitions. Between Bolívar's departure in 1826 and the consolidation of power under Ramón Castilla in 1845, Peru witnessed a dizzying succession of more than two dozen presidents, coups, and civil wars. Constitutions were written and discarded with astonishing speed. The 'Republic' was less a coherent state than a collection of competing fiefdoms. Among the most formidable figures of this era was not a man, but Francisca Zubiaga y Bernales, the wife of President Agustín Gamarra. Known as 'La Mariscala' (The Marshal), she defied all conventions, reviewing troops in a military uniform, riding alongside her husband in campaigns, and ruthlessly engaging in the political machinations of Lima. She was a kingmaker and a force of nature, embodying the turbulent, personalist, and violent politics of the era.
Amidst this chaos, life tried to find a rhythm. In Lima, the famous `tapadas limeñas` continued their intriguing dance. These women, draped head-to-toe in a dark saya skirt and a manto shawl that covered their face except for a single, alluring eye, were a symbol of an older, colonial world of secrets and veiled power. They moved through the city’s streets, their anonymity granting them a freedom unheard of for other women, observing the new republic from behind their disguise. The grand wooden balconies of Lima's mansions, once a sign of Spanish colonial prestige, now looked down upon military parades for the latest caudillo to seize power. But away from the capital, in the Andean highlands, change came much more slowly. For many Quechua-speaking communities, the shift from a Spanish viceroy to a criollo president in Lima meant little. Their lives remained tied to the planting seasons, the communal `ayllu` system, and a syncretic Catholic faith, punctuated only by the unwelcome arrival of the republican tax collector or army recruiter.
The struggle to define Peru extended to its borders. The grand Bolívarian dream of a unified Andean nation had evaporated. Tensions with neighboring Gran Colombia (soon to fragment itself) and Bolivia simmered. The most dramatic expression of this was the short-lived Peru-Bolivian Confederation (1836-1839), an attempt by the Bolivian Marshal Andrés de Santa Cruz to unite the two nations. This union was seen as a profound threat by neighboring Chile, which launched a military intervention that ultimately destroyed the confederation in the bloody Battle of Yungay. The conflict further devastated Peru’s economy and deepened its political fractures, proving that building a nation was as much about fending off neighbors as it was about resolving internal strife.
By the early 1840s, Peru was a nation on the brink of collapse, seemingly locked in a perpetual cycle of civil war and bankruptcy. Salvation arrived from a most undignified and pungent source: bird droppings. On the barren Chincha Islands off the Peruvian coast lay mountains of guano, the accumulated excrement of seabirds over millennia. This substance, an incredibly potent fertilizer, was in high demand by the agriculture-hungry nations of Europe and North America. The start of the Guano Era around 1845, expertly managed by the new, pragmatic president Ramón Castilla, changed everything. For the first time, the Peruvian state had a massive, stable source of income that did not depend on taxing its impoverished population. It was a messy, smelly, but miraculous boom. This newfound wealth finally offered a path out of the chaos, a chance to build railways, abolish the indigenous tribute for good, and invest in a modern state. As 1845 dawned, the era of the caudillos was ending, and an age of guano-fueled prosperity was beginning, offering Peru its first real glimmer of hope since the fateful declaration in the Plaza de Armas.