Army of the North The Army of the North ( ) , contemporaneously called Army of Peru , was one of the armies deployed by the United Provinces of the Río de la Plata in the Spanish American wars of independence . Its objective was freeing the Argentine Northwest and the Upper Peru ( present - day Bolivia ) from the royalist troops of the Spanish Empire . It was headed by Hipólito Vieytes ( 1810 ) , Juan José Castelli ( 1810 – 1811 ) , Juan Martín de Pueyrredón ( 1811 – 1812 ) , Manuel Belgrano ( 1812 – 1814 ) , José de San Martín ( 1814 ) , José Rondeau ( 1814 – 1816 ) , Manuel Belgrano ( 1816 – 1819 ) . The offensive operations started in 1810 and ended in 1817 , with the defeat of the forces commanded by Gregorio Aráoz de La Madrid at the battle of Sopachuy , the last attempt to advance into Upper Peru . Since then , only defensive operations on the Northern frontier were carried on , as the offensive had been transferred to the Army of the Andes , commanded by José de San Martín , who devised the strategy of reaching the main royalist stronghold , Lima , through Chile and the Pacific Ocean . In 1820 the Army of the North was summoned to intervene in the internal strife between the central government in Buenos Aires and the Federal League provincial caudillo leaders . Shortly after , the Arequito Revolt led by the independentist veterans who refused to fight a civil war instead of an independence war , effectively ended the existence of the Army of the North . During the War of the Confederation , between Chile , Argentina and the Peru - Bolivian Confederation , a new military corps received the name of Army of the North ( 1837 ) under the command of Alejandro Heredia . The Army would disband itself without conducting any major operations after the uprising known as North Coalition and the 1838 assassination of Heredia . The war ended in 1839 with a decisive Chilean victory at the Yungay , so the Peruvian - Bolivian army retreated from Argentine territory . First campaign to Upper Peru . The lack of trained military was one of the most pressing difficulties of the revolutionary government in Buenos Aires . Besides the Patricios Regiment and other corps formed during the British invasions , the only troops with some experience were the Blandengues , lancers militia recruited to patrol the borders of the territories still controlled by indigenous people ( mapuche and ranquel ) . Not until 1812 , with the return of veterans from the Napoleonic Wars , that would join as officers , with knowledge of military doctrine . Before that most of the commanders were civilians or junior officers , put in charge more for their political leanings , status in society or charisma than for their military capacity . Army ' s formation and Liniers ' execution . What would later become the Army of the North started with the troops conscripted by Juan José Castelli by order of the Primera Junta on 14 June 1810 , to fight viceroy Santiago de Liniers , who headed a counter - revolutionary movement at Córdoba Province . The Junta ' s order followed its creation documents from 25 May of the same year , which required them to send an expeditionary force to the provinces . It was also in response to the Junta decree that created the Argentine Army on 29 May , five days after its formation . The Junta started a collection in Buenos Aires to equip the expeditionary force and created a small army of 1 , 150 men , which left from Monte de Castro on 6 July 1810 under the command of colonel Francisco Ortiz de Ocampo , and lieutenant colonel Antonio González Balcarce . After receiving their orders they took the road to Córdoba to confront Liniers . Similar to the armiens in the French Revolution , they were accompanied by the Junta ' s representative ( political command ) , Hipólito Vieytes as commissioner and for the army ' s comptroller Feliciano Chiclana , who reached the army later on 28 July at Fraile Muerto and continued to Salta with a small guard , where he was named governor of Salta and Tucumán . The military command was subject to the political representative and he to the Junta through the Secretary of War Mariano Moreno . Vieytes carried instructions to arrange in each province for elections so the people could designate their representative to the new Junta . The force was composed of about 1 , 000 men in two companies with the 1st and 2nd Patricios Regiments , 3rd Arribeños , 4th Montañeses , and 5th Andaluces , plus the Pardos and Morenos regiments and 50 soldiers of the Buenos Aires regiment , all infantry . The artillery was formed by a group of 60 men with 4 pieces and 40 veteran artillery men . They were accompanied by two surgeons and two chaplains . The cavalry was divided into 50 dragoons , 50 hussars and 100 blandengues . On 14 July the force arrived in Luján , continuing through Salto , and Pergamino . On 8 August they arrived in Córdoba . On 31 July the royalist commanders in Córdoba had fled to Upper Peru after the dissolution of their regiments , to join the royalist army there . Liniers was captured on 6 August in the Córdoba highlands along with others officers from his command , who were sent to Buenos Aires against the execution orders , but on 26 August they were met in Cabeza de Tigre by the new political command of the Army of the North sent by Moreno . Castelli then ordered and immediate execution by firing squad for Liniers and the Córdoba governor , Juan Gutiérrez de la Concha , lieutenant - governor Victorio Rodríguez , Santiago Alejo de Allende and Joaquín Moreno , but pardoned bishop Rodrigo de Orellana , who was sent as a prisoner to Luján . Domingo French , gave the coup de grâce to the French officer . By order of the Junta , González Balcarce replaced Ortiz de Ocampo as troop commander , with Juan José Viamonte as his second in command replacing Vieytes . Juan José Castelli occupied the post of political representative and Bernardo de Monteagudo the comptroller . French and Rodríguez Peña became part of the new political committee . With Córdoba occupied on 8 August , they replaced their cabildo and Juan Martín de Pueyrredón was named governor , assuming the post that same month . Later they continued their march towards Upper Peru , where the Spanish general José de Córdoba y Rojas was commander of the royalist troops . The spontaneous joining of several cabildos augmented Balcarce ' s troops . In Salta he received more troops , commanded by Martín Miguel de Güemes . In Santiago del Estero Province a battalion of Patricios was formed commanded by Juan Francisco Borges . With central and northwest Argentina free of royalist governors , as also the cabildos of San Luis ( 13 June ) , Salta ( 19 June ) , Mendoza ( 25 June ) , San Miguel de Tucumán ( 26 June ) , Santiago del Estero ( 29 June ) , San Juan ( 7 July ) , La Rioja ( 1 September ) , Catamarca ( 4 September ) and San Salvador de Jujuy ( 14 September ) professed allegiance to the Junta in Buenos Aires and sent deputies . Tarija , in today ' s Bolivia , also joined on 25 June . First operations in Upper Peru . With the insurrections in Alto Perú , Balcarce initiated the march towards it with 400 men . The first armed action of the Army of the Northin Upper Peru was the Battle of Cotagaita , about North of San Salvador de Jujuy , on 27 October . The battle was not favorable to Balcarce and the outcome undecided , in part for the numerical superiority of the royalist , forcing the expeditionary troops to retreat to the South without pursuit . Balcarce reorganized his troops two days later in Tupiza . On 3 November , the Junta created the 3rd Infantry Regiment in the Argentine north , and placed it under the command of colonel Juan José Viamonte , with the infantry obtained from Buenos Aires and coningents from Tucumán and Santiago del Estero . On 5 November the royalist forces started their march towards Tupiza , so Balcarce left that town the next day , and it was then occupied by 1 , 200 royalist troops . He stopped at Nazareno , where he received a reinforcement of 200 men from Jujuy with two pieces of artillery . On 7 November they again confronted the same troops they had met before at Suipacha , where the Argentine army obtained its first victory . The battle was favorable to Balcarce even though he again had numerical inferiority ( 800 royalist against 600 rebels , and in Cotagaita 2 , 000 royalists against 1 , 100 rebels ) . Balcarce earned the rank of brigadier , and the confidence to advance towards the Desaguadero River , border of the viceroyalty in colonial times . Due to internal disagreements Castelli had to dismiss Güemes and his gaucho soldiers . The royalist defenses were left in charge of general José Manuel de Goyeneche , who met with Castelli and signed an armistice to last for forty days from 16 May . The army moved from the encampment at La Laja , where they were since April , to the new encampment at Huaqui . General Pueyrredón was named president of the Audiencia de Charcas . On 21 November , a decree from the Primera Junta in Buenos Aires created the 7th Infantry " " Cochabamba Regiment " " with veteran forces from Upper Peru , composed of 12 companies of 100 soldiers each , with Cochabamba ' s governor Francisco del Rivero as their new commander . Defeat at Huaqui and retreat from Upper Peru . On 20 June 1811 , Castelli violated the armistice and tried to surround the royalist troops crossing the Desaguadero River , Goyeneche ordered and attack ( according to other sources he violated the armistice first ) , at what became the Battle of Huaqui . The 5 , 000 rebel soldiers and the indigenous peoples with them could not deal with the strongly armed 6 . 500 royalist soldiers and suffered their biggest defeat to date . As a consequence of this battle , Goyeneche captured La Paz and Cochabamba after the battle at Amiraya ( also known as first Battle of Sipe Sipe ) on 13 August 1811 . The disorganized remainder of the army retreated south , taking refuge first in Potosí , which had been abandoned by Pueyrredón when he took the silver treasure from the city , then in Jujuy and finally in Salta ' s territory , where they would receive help from Güemes and where Balcarce was replaced by Pueyrredón . General Eustaquio Díaz Vélez with 800 soldiers was sent by Pueyrredón to support the insurrection at Cochabamba in a new attempt to advance on Upper Peru , but were repealed at Nazareno on 12 January 1812 . On 26 March 1812 the first campaign of the expeditionary army ended officially when Pueyrredón was replaced by brigadier general Manuel Belgrano . Balcarce and Castelli where considered responsible for the debacle and were put on trial . Castelli died before sentence was pronounced , and Balcarce absolved and rejoined the fight , this time under the command of San Martín . Second expedition to Upper Peru . Belgrano assumes command . In 1812 , with the new commander Manuel Belgrano , the Junta decided to fund a second expeditionary campaign to Upper Peru with the objective of finally defeating the royalist troops , conquer Upper Peru and avenge the overwhelming defeat at Huaqui , and also to raise the moral of the troops and citizenry . On 26 March , Belgrano received command from Pueyrredón at Yatasto ( Salta Province ) and immediately advanced towards Jujuy Province , where he established a defensive perimeter . When Belgrano took charge , the Army of the North comprised the following units : Belgrano ' s task in the north , same as his previous one in Paraguay , was part politics and part military ; they counted on him to restore the morale on the region and try to disarm the local royalists among the population , many of whom were priests or rich citizens . He was preferred for the post , instead of other more experienced or capable officers as Eustaquio Díaz Vélez or Juan Ramón Balcarce , both colonels at the time and veterans of many battles . Among the junior officers there were several that would make a name for themselves such as José María Paz , Manuel Dorrego and Gregorio Aráoz de La Madrid . While in Salta , he would receive the help of Baron Holmberg , veteran artillery man from the European wars , who would take charge of his meager artillery — only two cannon at first — and would give help on strategic planning . His army ' s numbers were also low , only about 1 , 500 men at first , with two third on cavalry , and only a little more than 600 had firearms . Bayonets were in short supply , so they had to improvise by adding lance s to their arsenal . Those officers that could not bring their own saber would have to do without . The scarcity of arms and supplies forced them to impose a strict control and organization . Belgrano spent the first months of his command in establishing a hospital , military tribunal , supply corps , reconnaissance company and in negotiating the manufacturing of ammunition and clothing . The relative hostility of the local population over the demands of the porteño s did not make his job easy . He utilized the few friendships with the locals , La Madrid among them , to help with troop recruiting . Crucial in this task was Güemes , who with his troubled personal relations with Belgrano would force the latter to release him in June before even having had a chance to do combat . The army was thus formed by 6th Infantry Regiment , Battalion of Peru Rifle Huntsmen commanded by Carlos Forest , a battalion of Pardos and Morenos ( " mulattoes " ) , 14 pieces of artillery , the " Provisional Cavalry of the Río de la Plata " commanded by Balcarce ( after the joining of the Dragoon and the Hussar regiments ) and the Cochabamba Regiment . There were also local militias such as the Salta Militia commanded by Güemes . The military comptroller was Teodoro Sánchez de Bustamante . On 1 July 1812 , Belgrano created the 8th Infantry Regiment with men from Upper Peru , but it was disbanded after the defeat at Vilcapugio as most of the officers and more than half their soldiers were lost at the battle . In Salta he found an intelligence net who was passing information to Goyeneche ' s royalist army , headed by the city ' s bishop , whom he forced to leave the territories controlled by the Junta . Even though they suffered from malaria he decided to advance towards Cochabamba . The advanced elements consisting of the battalion of mulattoes and the two cavalry regiments of Hussars and Dragoons , reached Humahuaca , while the rest of the army positioned itself in Jujuy . He celebrated there the second anniversary of the May Revolution , and he had a new white and light blue flag blessed by the chaplain . The well - planned solemn ceremony helped gain the support of the locals who were distrustful and some supported the royalist army and the dislike of the troops to the Prussian regime imposed by Holmberg . Order was strict and Belgrano ordered capital punishment inflicted for whom disobeyed express orders . One of the deserters due to the strict discipline was Venancio Benavídez , who moved to Goyeneche ' s forces , which had already taken Cochabamba and he told of the harsh conditions at Belgrano ' s army . With that intelligence , Goyeneche , who had just reinforced Pío de Tristán , decided to advance towards the south and press the advantage . Belgrano ordered conscription of all able men , forming a troop of cavalry irregulars , but received the order to retreat towards Córdoba from the Junta in Buenos Aires . Jujuy ' s exodus and battles of Tucumán and Salta . Belgrano decided to leave nothing available for the enemy to use as supplies , he used scorched earth tactics , during the so - called Jujuy Exodus ( " " Exodo Jujeño " " ) , ordering the civilian population to move out of the city and into the countryside along with the army , and to burn everything left behind to hinder the enemy ' s advance . The retreat was orderly , with Díaz Vélez ' s troops protecting the rearguard . On 3 September he made contact with the enemy , whose advanced elements had chased the cavalry to the Las Piedras river . Taking advantage of the terrain , and with Holmberg ' s help , Belgrano opened fire with his new artillery and turned the tables on the enemy , taking the leader of the royalist advance , Colonel Huici , prisoner . Ten days later , they encamped in Tucumán , where they decided to end the retreat . On the 24th they confronted Tristán at the Battle of Tucumán , where a decisive cavalry charge gave the rebels a victory . 1 , 800 patriots ( 800 infantry , 900 cavalry and 100 artillery men ) defeated 3 , 000 royalists ( 2 , 000 infantry and 1 , 000 artillery men ) . The royalists suffered 450 casualties , 687 prisoners and lossof ammunition and materiel . Tristán was forced to retreat north to Salta , lost his artillery and most of his wagons to the independentist army , who needed the supplies and could put them to good use . The four months he had to reorganize after the victory at Tucumán allowed Belgrano to double the number of men and improve on training and discipline , even though he lost Holmberg , who had made enemies of other officers and was recalled to Buenos Aires . The lack of a chief of staff with tactical experience would be felt later . He received reinforcements from Buenos Aires : 1st Infantry Regiment , commanded by lieutenant colonel Gregorio Perdriel with 395 men , 4 companies of 2nd Infantry Regiment with 360 men commanded by lieutenant colonel Benito Alvarez and 70 to 80 mulattoes . Well equipped and with high morale , they started on 12 January the march north to Salta , where Tristán had entrenched . A month later , on the margins of the Juramento river ( today ' s Salado River ) , the troops where the first to swear loyalty to the Constitutional Assembly and to the new flag recently created by Belgrano por Belgrano ( today ' s Argentina ' s flag ) . With the help of captain Aparicio , a local from the area , allowed them to reach the road to Jujuy through a not - well known road and confront Tristán by his rear on 20 February . After a slow start , the independentist victory at the Battle of Salta was decisive , and Tristán surrender unconditionally . 3 , 700 patriots with 12 pieces of artillery annihilated 3 , 700 royalists with 10 pieces of artillery , with 480 royalist dead and 114 wounded , while Belgrano ' s troops only had 13 dead and 433 wounded . In exchange for the swearing to never again take arms against the United Provinces , Belgrano guaranteed Tristán and his men their freedom ; took all his arms and supplies , which improved the army ' s situation considerably . Second Upper Peru campaign and retreat to Jujuy . Continuing his march to the north , he took Potosí on 21 June and Vilcapugio on 27 September where they awaited reinformcement . Meanwhile rebel scouts , under the command of Colonel Cornelio Zelaya , defeated a royalist squadron at Pequereque on 19 June . Belgrano named colonel Figueroa as governor of Potosí , colonel Álvarez de Arenales as governor of Cochabamba and colonel Warnes in Santa Cruz . As president of Charcas he named Francisco Antonio Ortiz de Ocampo . Knowing that Goyeneche and Joaquín de la Pezuela , an able and experienced soldier , had the advantage , he negotiated with Goyeneche a 40 - day armistice . The Assembly in Buenos Aires and the viceroy of Peru , José Fernando de Abascal , disapproved of this agreement . The royalists attacked by surprise , disregarding the agreement , before the arrival of reinforcements at the Battle of Vilcapugio on 1 October 1813 . The royalist army , commanded by brigadier Joaquín de la Pezuela and with 4 , 000 men and 12 pieces of artillery confronted a patriot army with a high morale composed of 3 , 500 men , 14 pieces of artillery and cavalry mounted mostly on mules . Even though it started as a victory for the rebels the tables turned and they were defeated , retreating to Macha where Belgrano established his headquarters and managed to receive reinforcements following the royalist withdrawal after the rebel success at Tambo Nuevo . He then marched to Ayohuma arriving on 9 November . Five days later the royalist army arrived , commanded by General Joaquín de la Pezuela , to fight at the Battle of Ayohuma . The rebel army , with 2 , 000 men and 8 pieces of artillery ( even though they counted 3 , 400 men , 1 , 400 were not in fighting conditions ) they confronted a superior army with 3 , 500 men and 18 pieces of artillery . The fight was bloody for both sides , with a rebel defeat , but they were not chased by the royalists as they had suffered 500 loses and after a very trying battle . As a consequence of these defeats , Upper Peru returned to royalist control and Belgrano returned to Jujuy . In January 1814 , at Tucumán , Manuel Belgrano was replaced by the then colonel José de San Martín who was put in charge of the 1st Regiment and on the 30 of the month , the government separated Belgrano from the Army of the North and returned to Buenos Aires , where he was arrested and processed , but in the end his merits and accomplishments where recognized and honored . San Martín , quit four months later for health reasons and was replaced by colonel José Rondeau . Ignacio Warnes liberated Santa Cruz de la Sierra . Warnes and Álvarez de Arenales continued with the resistance in Upper Peru but the first one was killed at El Pari , and the latter obtained victory at La Florida ( 24 May 1814 ) and Postrer Valley ( 4 June ) , but was later defeated at Sumarpata on 5 August . The campaign objectives were partially accomplished . The royalist army was not defeated , but they could contain their advance into northern Argentina and keep the revolution going . Third Auxiliary Campaign to Upper Peru . After having protected the Argentine north for a year , the Army of the North received orders for a third campaign to Upper Peru ( present - day Bolivia ) . The objective this time was to occupy all of Upper Peru , closing the door on the royalists and therefore establishing the sovereignty of the United Provinces of the Río de la Plata . Afterward they planned to continued the advance to Lima to try to liberate the capital of the Viceroyalty of Peru . Mutiny and new advance on Upper Peru . While the troops were being prepared to start the third campaign , general Carlos María de Alvear was named as replacement for Rondeau . The Army of the North ' s officers mutinied and told to Rondeau they would only accept orders from him and disregard Alvear ' s and they asked him to initiate the campaign . Rondeau accepted and ordered the start of the operation in January 1815 . During the first ten months there were some skirmishes against the royalist troops , but never of the size of the previous campaign . On 19 February they fought the battle of El Tejar , where the patriot vanguard was surprised by the whole of the royalist army . Colonel Martín Rodríguez was captured with his subordinates . Rodríguez was later released in an exchange of prisoners . The following April , the army stopped at " Puesto del Marqués " , a small village that was occupied by royalists forces . General Rondeau , advanced with 500 men defeating the 300 defenders . Continuing forward with the march into Upper Peru , a reconnaissance group found royalist troops encamped at " Venta y Media " commanded by Olañeta . They prepared a plan to attack them by surprise , but they failed and the royalists escaped . General Joaquín de la Pezuela , the royalist commander , moved his forces back to Oruro , abandoning towns that were later occupied by Rondeau ' s forces , who took control of Potosí and Charcas and established a headquarters at Chayanta . Güemes , unhappy with Rondeau , abandoned the army along with his gaucho forces and returned to Salta , carrying with him many of the supplies left in Jujuy . Defeat at Sipe - Sipe and retreat to Tucumán . The only great battle of the campaign happened on 29 November 1815 . When the patriot army was situated north of Venta y Media , nearing Cochabamba they found the army commanded by General Pezuela and fought the Battle of Sipe - Sipe which ended in a defeat for the rebels . The 3 , 500 men and 9 artillery pieces could not deal with the 5 , 100 royalists and 23 artillery pieces and had to escape with about 1 , 000 casualties , while the royalists only counted 32 dead . Objectives were not met and the provinces were left surrounded by potential enemies . British and French could arrive by sea , Portuguese from the East and Spaniards from the North . Had they conquered Upper Perú , the biggest threat , the royalists , would have been ended . In January 1816 , Lieutenant Clonel Gregorio Aráoz de Lamadrid was sent to the north , but on 31 January was defeated at Culpina . On 2 February he had a victory at Utarango and was later defeated on 12 February by the San Juan river . Rondeau received an order to retreat to Tucumán . The army , almost beaten , marched for nine months going through Potosí and Humahuaca until reaching Tucumán . On 7 August 1816 at Trancas , Rondeau was replaced again by Manuel Belgrano . Martín Miguel de Güemes was named commander of the northern border . Belgrano moved the army to the citadel built by San Martín in the city of Tucumán . There he attempted to rebuild the morale , and materials , in search for a new action in Upper Peru , combining with San Martín actions in the Andes . Fourth Campaign and gaucho war . The fourth campaign was the last attempt to liberate Upper Peru . Belgrano sent troops with the objective of supporting the resistance in Oruro . The army also intervened in this stage in internecine quarrels . On 10 December 1816 Belgrano sent La Madrid to quelch the autonomist movement in Santiago del Estero , defeating Juan Francisco Borges ' s troops at Pitambalá . On 1 January 1817 Borges was executed by firing squad in Santo Domingo by order of the Tucumán Congress . On 18 March 1817 a troop of 400 soldiers left San Miguel de Tucumán under the command of general La Madrid to advance to Oruro . Once in Upper Peru they were joined by local rebels under the command of Eustaquio Méndez , José María Avilés and Francisco Pérez de Uriondo , who helped to stop reinforcements from reaching Tarija ' s royalist commander , Mateo Ramírez . On 15 April 1817 the rebels were victorious at the Battle of la Tablada de Tolomosa , taking over Tarija . The victory gave the Army of the North a lot of arms , ammunition , supplies and prisoners , plus over a thousand new volunteers from Upper Peru who joined the army . La Madrid stayed in Tarija until 5 May 1817 . He named Francisco Pérez de Uriondo governor of Tarija and marched towards Chuquisaca . In the course of his march , he captured an entire Royalist company on Cachimayo hill . La Madrid attacked Chuquisaca on 21 May in a frontal assault , but was defeated . On 12 June the army was caught by surprise at Sopachuy ( southeast of Chuquisaca ) and was defeated after a brief battle . They had to retreat to Salta , by the same road . Last royalist invasion and death of Güemes . In August 1817 colonel Olañeta iniated a new invasion with 1 , 000 men . On 15 August they fought at the second battle of Humahuaca , city evacuated by colonel Arias . On 12 September they fought at Huacalera , where Arias captured royalist prisoners . On 3 January 1818 the royalsts retreated to Yavi and returned to Upper Peru . A while later Olañeta and colonel José María Valdez invaded Yavi again with 2 , 400 men . On 14 January they occupied Jujuy , but had to evacuate on 16 January and returned to Yavi . On 11 July 1817 , commander Mariano Ricafort reoccupied Tarija and committed acts of vengeance against the local population , ordering the burning of the Cabildo and the Tarija Archives . Colonel José Canterac after pacifying Tarija and Cinti , started a new invasion with three columns under command of Olañeta ( through Humahuaca ) , Vigil ( through Orán ) and Valdez ( through Despoblado ) . On 26 March the occupied San Salvador de Jujuy for a few hours but had to retreat to Yala under risk of being isolated . Later on they returned to Tupiza . On 1 February 1820 the Army of the North received orders to abandon Tucumán and go to Buenos Aires to fight the autonomist risings . Defense of the northwest was left to the gaucho soldiers of Güemes . In February 1820 José Canterac was replaced by Juan Ramírez Orozco as commander of the Royalist forces in Upper Peru . On 12 May Orozco commanding a force of 4 , 000 men advance to Jujuy , and on 28 May occupied the city , then on 31 May occupied Salta . On 2 June the royalist forces defeated the patriots at Chamical ( southwest of the city of Salta ) . At the battle of Las Cañas lieutenant colonel Rojas was killed but 400 royalist forces were defeated . On 8 June there was a new independentist victory at Cuesta de la Pedrera ( southeast of Salta ) , dispersing 2 , 000 royalist who retreated to Jujuy . At the battle of Yala another royalist force was defeated and colonel Vigil , their commander , was captured . De La Serna ordered a retreat to Tupiza . On 15 April 1821 colonel Guillermo Marquiegui entered Jujuy which he had to abandon a while later . On 27 April they fought at León ( north of Yala ) , where general José Ignacio Gorriti defeated 400 royalists , so Olañeta had to retreat his forces to Tilcara . On 7 June he sent 600 infantry under colonel José María Valdés from Yavi , who marched to Purmamarca and taking side roads bypassed Tres Cruces and Chañi and on 7 June took Salta by surprise , where one of his advance parties wounded Güemes , who died on 17 June 1821 in Chamical . Colonel José Enrique Vidt assume command of Güemes ' army . On 22 June Olañeta took Jujuy and advanced to Salta , where finding himself surrounded , he signed an armistice 14 July and returned to Upper Peru . Olañeta made his last incursion into Argentine territory in June 1822 , reaching Volcán ( north of Jujuy ) . On 6 December 1822 he left Argentina for the last time , therefore ending the royalist invasion . On 4 August 1824 governor of Salta , general Juan Antonio Álvarez de Arenales , named commandant to general José María Pérez de Urdininea as per a request from marshal Sucre , and ordered him to go to Upper Peru to attack Olañeta from the south , starting his march on 3 January 1825 . In March 1825 Álvarez de Arenales started another campaign but when at his headquarters at Tilcara he received the news that lieutenant colonel Carlos Medinaceli had turned to the independentist cause , so he sent Pérez de Urdininea from Humahuaca to support Medinaceli . On 1 April 1825 they fought at Tumusla where Medinaceli defeated Olañeta , finally liberating Upper Peru . Component units of the Army of the North . July – August 1810 November – December 1810 March 1812