What happened at the Battle of Yungay?
On 20 January 1839, at Yungay in the Andean department of Ancash in northern Peru, the United Restoration Army of Chileans and Peruvian opponents of Andrés de Santa Cruz, led by the Chilean general Manuel Bulnes, defeated the army of the Peru-Bolivian Confederation. The fight opened with the storming of the Pan de Azúcar hill. Santa Cruz fled into exile and the Confederation he had created in 1836 was dissolved.1
Yungay is little known outside the Andes, but it decided the shape of three countries. The battle ended a three-year experiment that had joined Peru and Bolivia under one ruler, and in Chile it became a founding legend of the young republic, still remembered every 20 January.2
Who won the Battle of Yungay and why?
The United Restoration Army of Chileans and Peruvian opponents of Santa Cruz, under Manuel Bulnes, won. Its infantry stormed the Pan de Azúcar, the outpost Santa Cruz thought could not be taken, held on when a counterattack drove back its center, and broke the Confederation's army once fresh battalions and the cavalry crossed the Ancash ravine.3
Background: Santa Cruz's confederation
Peru won its independence in 1824 and Bolivia in 1825, and the idea of joining them was in the air from the start, the historian Joaquín Fernández of Finis Terrae University told BioBioChile. Andrés de Santa Cruz, a former royalist officer who had fought for independence under Bolívar and Sucre and became president of Bolivia in 1829, made it real. Using the Peruvian civil wars of 1835, he conquered Peru and divided it into a northern and a southern state, which together with Bolivia formed the Confederation, with himself as protector.4
The decree that created the office gave Santa Cruz a term of ten years as protector, with the right to be reelected, according to the Encyclopedia of Latin American History and Culture and Fernández. The northern Peruvian elites resented the new state, Fernández says, while highland regions such as Arequipa and Cusco favored it as a counterweight to Lima.5

Why Chile went to war
Chile watched with alarm. The rivalry between the ports of Valparaíso and Callao was turning into a tariff war, Peru still owed Chile money from the wars of independence, and a powerful new state on the northern border threatened Chile's place on the Pacific. When the Chilean exile Ramón Freire sailed from a Peruvian port in an attempt to overthrow the government in Santiago, the minister Diego Portales had his pretext, and in 1836 the war began.6
Chile was not alone: Argentina also went to war with Santa Cruz, though its army was beaten in 1837. The first Chilean expedition, under Admiral Manuel Blanco Encalada, ended after some fighting in the Treaty of Paucarpata, which recognized the Confederation in all but name; the government in Santiago repudiated it. Portales himself did not live to see the outcome. In June 1837 he was killed by mutinous troops at Quillota, an event that shook a country already divided over the war.7
Armies and commanders
Manuel Bulnes commanded the second expedition. It was a joint force: Peruvian generals hostile to Santa Cruz, among them Agustín Gamarra and Ramón Castilla, marched with the Chileans, and the army called itself the United Restoration Army, restoring, as it claimed, Peru's independence.8 › Battle of Maipú, 1818

Andrés de Santa Cruz commanded the Confederation's army in person. His line had General Ramón Herrera's Bolivian division on the right and General Trinidad Morán's division of Peruvian battalions on the left, with two cavalry regiments under General Pérez de Urdininea behind them; the protector took his own post behind the cavalry, where he could watch the whole field.9
The position and the numbers
Santa Cruz had chosen strong ground. General Quiroz held the steep cone of the Pan de Azúcar, in front of the main position, with about 600 men in five companies. Behind it the deep ravine of the Ancash stream cut across the valley, and beyond the ravine the Confederation's infantry stood behind a long stone parapet, its right against the mountains and its left on the Santa river.10
How many men fought is disputed. Gonzalo Bulnes, who went through the Chilean muster rolls in 1878, counted 4,467 Chilean officers and men and about 800 Peruvians in two battalions, 5,267 in all, and Ramón Sotomayor Valdés gives the same total; the Encyclopedia of Latin American History and Culture credits Bulnes with a combined force of 6,000. For Santa Cruz the figures run from the 4,052 men he admitted to in his manifesto from Quito to the 6,100 of Bulnes's official report, and both Chilean historians put his army at no fewer than 6,000.11
The commanders' decisions
Bulnes judged that the battle could not be fought until the Pan de Azúcar was taken: as long as it held out, its garrison could fire into his columns and cut their retreat. He also asked President Gamarra, who had come to the field in person, not to expose his life, and Gamarra stayed with the reserve on the near side of the Ancash. Santa Cruz, for his part, believed the hill could not be taken.12
Who really directed the victory was disputed decades later. In September 1863 a letter signed “A Peruvian” in the Lima newspaper El Comercio, which Gonzalo Bulnes attributes to the Arequipa canon Juan Gualberto Valdivia, claimed that around one o'clock Bulnes had ordered a retreat to San Miguel and that General Ramón Castilla had turned the troops back and won the battle. Gonzalo Bulnes dismissed the story, pointing to units in it that had never existed.13
The battle in phases
The campaign. After several campaigns in Peru, Bulnes's army met Santa Cruz's army at Yungay, in the valley of the Santa river in the highlands of Ancash, on 20 January 1839.14
The Pan de Azúcar. The battle opened with an attack on the Pan de Azúcar, a steep hill held by Confederation troops. Restoration infantry, Chileans and Peruvians together, climbed it under fire and after a hard fight drove the defenders off the top; both the retired officers' association UNOFAR and Chile's Museo Histórico Militar make its capture the first act of the battle.15
The assault column was made up of four companies of light infantry, from the Carampangue, Santiago and Valparaíso battalions and the sixth company of the Cazadores del Perú, under Comandante Jerónimo Valenzuela, with the Peruvian colonel Juan Antonio Ugarteche. They went up at about nine in the morning under fire and a hail of rolling stones, on slopes so steep that the men had to haul themselves up on their muskets and on one another.16
Valenzuela and his second, Major Andrés Olivares, were killed on the way up, and so were most of the officers; one company reached the top led by a sergeant. On the summit the fight was hand to hand. Bulnes's report, quoted by both historians, says the five companies holding the hill perished with General Quiroz, their commander.17
While the climb was still going on, the Bolivian 4th Battalion crossed the ravine to help the hill's garrison. Bulnes sent the Colchagua battalion against it; hidden in thick scrub, its men let the Bolivians come close and then fired a volley at short range. Companies of the Portales came up in support, the Bolivian battalion fell back across the Ancash, and in this fighting the Peruvian general Juan Bautista Eléspuru, at the head of the first division, was mortally wounded.18

The main battle. With the hill taken, the restorers advanced across the Ancash stream against the Confederation's main line. The fighting lasted for hours. Bulnes's own report, quoted by UNOFAR, called it "one of the most bitter and bloody battles ever seen in America," fought from ten in the morning to four in the afternoon, in which the enemy defended themselves "with extraordinary tenacity."19
Turning point: the cavalry on the flank
The crisis came in the afternoon. The Portales battalion, worn out after hours under fire in front of the parapets, began to give way, and the Bolivian 3rd Battalion leapt out of its trenches and charged it with the bayonet. Bulnes led the Valparaíso battalion across the ravine himself, and its arrival stopped the counterattack.20
The Museo Histórico Militar describes the decisive moment: after some four hours, when the Confederation's troops went over to the counterattack, Bulnes threw in his reserves, and his cavalry crossed the river and fell on the enemy's flank. A Chilean plan of the battle published in 1910 marks the same move, the squadrons that outflanked the enemy's left. Caught in front and rear, the Confederation's battalions broke, and the museum puts their losses in killed and captured at more than half their strength.21
The cavalry had a hard passage. The ravine could be crossed only in single file, and the first squadrons over, led by Colonel Fernando Baquedano, charged at once and were thrown back by Santa Cruz's escort and the Bolivian Lancers; Baquedano was wounded. He rallied them, charged again, and at the third attempt, with almost all the Chilean cavalry, drove the Confederation's horsemen back onto their own infantry. The restorers then went over the parapets with the bayonet.22

Among those who won fame that day was Candelaria Pérez, a cantinera, or sutler, with the Carampangue battalion. UNOFAR calls her the first woman whose service in the army and in a war is recorded in some detail, and says she was made a second lieutenant for her services; Fernández calls her Sergeant Candelaria Pérez and names her, with the Indigenous lieutenant Juan Lorenzo Colipí, among the new national heroes the war gave Chile from groups that had been outside public life.23
Counting the losses
In his report Bulnes put the enemy's loss at two generals and more than 1,400 men killed, and three generals, nine colonels, 155 officers and 1,600 men taken prisoner, together with all the artillery; both Gonzalo Bulnes and Sotomayor Valdés quote these figures. A staff diary kept by Colonel Antonio Placencia, quoted by Sotomayor Valdés, counted 2,054 Confederation dead and 215 of the Restoration's own buried at the Ancash, while Gonzalo Bulnes puts the Chilean loss at about 1,300. The Museo Histórico Militar says the Confederation lost more than half its strength in killed and captured.24
Aftermath
Yungay broke Santa Cruz, and the Confederation was dissolved at once. Santa Cruz himself had left the field before the fighting ended. He fled first to Lima and then to Arequipa, hoping to rebuild his army, and from the port of Islay sailed away on a British frigate into exile in Ecuador, as Gonzalo Serrano del Pozo and the Encyclopedia of Latin American History and Culture both relate.25
He did not give up. When he later tried to return, he was caught: Serrano, working from the papers of the time, has him arrested at Tacna in southern Peru, while Fernández speaks of his capture by Chile. Either way he ended in Chilean custody, held at Chillán until 1846, and Serrano argues that President Bulnes treated his captive with marked care. Santa Cruz later left for Europe and died in France in 1865.26
In Peru, Agustín Gamarra became president. In 1841 he tried to bring Bolivia under Peru and was killed in battle at Ingavi, and both countries entered years of disorder. Fernández sees Bolivia gravely weakened and Chile the winner of the commercial rivalry between the Pacific ports.27
Legacy and memory
In Chile the war changed patriotism. The song of Yungay and the Day of the Chilean Roto, the common soldier, came out of it. Bulnes became a national hero in his lifetime and in 1841 was elected president of Chile. On the battlefield Gamarra had already hailed him as Grand Marshal of Ancash.28
Historians have long seen the victory as a building block of Chilean national identity. Serrano cites Mario Góngora, for whom Yungay and similar battles helped form a truly national consciousness, and Ricardo Krebs, who saw the war as a means of preserving and realizing the nation. He also notes critics, such as Jorge Núñez, who called it a war decided by a narrow conservative circle around Portales.29






