Military history of Argentina The military history of Argentina spans a period of over two centuries . During the course of those years , it broke colonial ties with Spain , waged a civil war to define its organization and wars with Brazil , Paraguay , Britain and France . The military also played a role in the institutional life of the country , during a series of coups d ' état that took place in the 20th century . Before independence . One of the first notable military conflicts taking place in modern Argentina were the British invasions of the Río de la Plata , involving both Buenos Aires and Montevideo ( currently part of Uruguay ) . As part of the Napoleonic Wars , a British force led by William Carr Beresford occupied Buenos Aires on June 27 . The French Santiago de Liniers moved to Montevideo and led the forces that would reconquer Buenos Aires on August 12 , 1806 . The Viceroy Rafael de Sobremonte , who had fled from the city to Córdoba , was not allowed to return , and Liniers was trusted to organize the defense of the city against a possible British counter - attack . For this end he drafted all men capable to bear arms , regardless of their social condition ( including slaves ) , and formed militias to defend the city . The Regiment of Patricians , composed of criollo people , was created during this time . The second invasion took place the following year . A new British army , much bigger than the first one , invaded first Montevideo and then moved to Buenos Aires , led by Lieutenant - General John Whitelocke . The British found a strong resistance and were forced to surrender , and return Montevideo to the viceroyalty . As a result of the invasions , Sobremonte was removed as viceroy , and replaced by Liniers . The Regiment of Patricians , led by Cornelio Saavedra , became a strong political force in Buenos Aires , and was instrumental to the failure of the Mutiny of Álzaga and the success of the May Revolution . 19th century . War of independence . The May Revolution ousted the Viceroy Baltasar Hidalgo de Cisneros and replaced him with a junta , the Primera Junta . The viceroyalty was also renamed , removing the " viceroyalty " word from it , and it nominally became the United Provinces of the Río de la Plata . However , the status of the different territories that used to belong to the viceroyalty changed many times during the development of the war , as some regions would remain loyal to the former organization , others were captured or recaptured , and later they would divide into several countries . The first military campaigns against the royalists were waged by Manuel Belgrano and Juan José Castelli . The Army of the North led by Castelli was headed first by Ortiz de Ocampo and defeated a counter - revolution organized by Liniers at Córdoba . Castelli took command to enforce the execution of the captured royalists , and then moved to the Upper Peru . He took control of it for a brief time , and was defeated by Goyeneche at the Battle of Huaqui . Belgrano led an ill - fated campaign to Paraguay , and created the Flag of Argentina when preparing the defenses of Rosario against a possible attack from the Banda Oriental ( where Montevideo was under siege by Artigas ) . Belgrano led a new campaign to the Upper Peru , achieving military victories at Salta and Tucuman , but being defeated at Vilcapugio and Ayohuma . By this time José de San Martín arrived to Buenos Aires with other generals of the Peninsular War . They gave new strength to the Revolutionary war , which was compromised by the defeats of Belgrano and Castelli and the royalist resistance at the Banda Oriental . Alvear took Montevideo , and San Martín started a military campaign that would span across an important part of the Spanish territories in America . First , he created the Regiment of Mounted Grenadiers and defeated a Spanish raid at the Battle of San Lorenzo ( the only battle that San Martín fought in Argentine territory ) . He created the Army of the Andes in Mendoza and , with help of Bernardo O ' Higgins nd other Chileans he made the Crossing of the Andes and liberated Chile . With the Chilean navy at his disposal , he moved to Peru , liberating that country as well . San Martín met Simón Bolívar at Guayaquil , and retired from action . The Congress of Tucumán was called while San Martín was preparing the crossing of the Andes . It declared independence from Spain or any other foreign power .