The Argentine War of Independence (Spanish: guerra de la independencia argentina) was a set of military events from 1810 to 1825 which resulted in the consolidation of Argentina as an independent country from Spanish rule. The historiographical term encompasses battles and military feats such as the Crossing of the Andes. Formal independence was declared in 1816 by the Congress of Tucumán.
The territory of modern Argentina was part of the Spanish Viceroyalty of the Río de la Plata, with its capital city in Buenos Aires, seat of government of the Spanish viceroy. Modern Uruguay, Paraguay and Bolivia were also part of the viceroyalty, and began their push for autonomy during the conflict, becoming independent states afterwards. The vast area of the territory and slow communications led most populated areas to remain isolated from each other. The wealthiest regions of the viceroyalty were in Upper Peru (modern-day Bolivia). Salta and Córdoba had closer ties with Upper Peru than with Buenos Aires. Similarly, Mendoza in the west had closer ties with the Captaincy General of Chile, although the Andes mountain range was a natural barrier. Buenos Aires and Montevideo, who had a local rivalry, located in the La Plata Basin, had naval communications allowing them to be more in contact with European ideas and economic advances than the inland populations living in provinces such as Tierra del Fuego and Chaco. Paraguay was isolated from all other regions.
In the political structure most authoritative positions were filled by people designated by the Spanish monarchy, most of them Spanish people from Europe, also known as peninsulares, without a strong commitment for South American problems or interests. This created a growing rivalry between the Criollos, white people born in Latin America, and the peninsulares, Spanish people who arrived from Europe (the term "Criollo" is usually translated to English as "Creole", despite being unrelated to most other Creole peoples). Although they were all considered Spanish, and there were no legal distinctions between Criollos and Peninsulares, most Criollos thought that Peninsulares had undue influence in political matters. The ideas of the American and French Revolutions, and the Age of Enlightenment, promoted desires of social change among the criollos. The full prohibition imposed by Spain to trade with other nations was also seen as damaging to the viceroyalty's economy.
The population of Buenos Aires was highly militarized during the British invasions of the Río de la Plata, part of the Anglo-Spanish War. Buenos Aires was captured in 1806, and then liberated by Santiago de Liniers with forces from Montevideo. Fearing a counter-attack, all the population of Buenos Aires capable of bearing arms was arranged in military bodies, including slaves. A new British attack in 1807 captured Montevideo, but was defeated in Buenos Aires, and forced to leave the viceroyalty. The viceroy Rafael de Sobremonte was successfully deposed by the criollos during the conflict, and the Regiment of Patricians became a highly influential force in local politics, even after the end of the British threat.
The transfer of the Portuguese Court to Brazil generated military concern. It was feared that the British would launch a third attack, this time allied with Portugal. However, no military conflict took place, as when the Peninsular War started Britain and Portugal became allies of Spain against France. When the Spanish king Ferdinand VII was captured, his sister Carlota Joaquina sought to rule in the Americas as regent, but nothing came out of it because of the lack of support from both the Spanish Americans and the British. Javier de Elío created a Junta in Montevideo and Martín de Álzaga sought to make a similar move by organizing a mutiny in Buenos Aires, but the local military forces intervened and thwarted it. Spain appointed a new viceroy, Baltasar Hidalgo de Cisneros, and Liniers handed the government to him without resistance, despite the proposals of the military to reject him.
The military conflict in Spain worsened by 1810. The city of Seville had been invaded by French armies, which were already dominating most of the Iberian Peninsula. The Junta of Seville was disestablished, and several members fled to Cádiz, the last portion of Spain still resisting. They established a Council of Regency, prelude to the Cortes of Cadiz, with political tendencies closer to Liberalism and Popular sovereignty than the former Junta of Seville. This began the May Revolution in Buenos Aires, as soon as the news was known. Several citizens thought that Cisneros, appointed by the disestablished Junta, did not have the right to rule anymore, and requested the convening of an open cabildo to discuss the fate of the local government. The military gave their support to the request, forcing Cisneros to accept. The discussion ruled the removal of viceroy Cisneros and his replacement with a government junta, but the cabildo attempted to keep Cisneros in power by appointing him president of such junta. Further demonstrations ensued, and the Junta was forced to resign immediately. It was replaced by a new one, the Primera Junta.
Buenos Aires requested the other cities in the viceroyalty to acknowledge the new Junta and send deputies. The precise purpose of these deputies, join the Junta or create a congress, was unclear at the time and generated political disputes later. The Junta was initially resisted by all the main locations around Buenos Aires: Córdoba, Montevideo, Paraguay and the Upper Peru. Santiago de Liniers came out of his retirement in Córdoba and organized an army to capture Buenos Aires, Montevideo had naval supremacy over the city, and Vicente Nieto organized the actions at the Upper Peru. Nieto proposed to José Fernando de Abascal y Sousa, viceroy of the Viceroyalty of Peru at the North, to annex the Upper Peru to it. He thought that the revolution could be easily contained in Buenos Aires, before launching a definitive attack.
Buenos Aires was declared a rogue city by the Council of Regency, which appointed Montevideo as capital of the viceroyalty of the Río de la Plata, and Francisco Javier de Elío the new viceroy. However, the May Revolution was not initially separatist. Patriots supported the legitimacy of the Juntas in the Americas, while royalists supported instead the Council of Regency; both acted on behalf of Ferdinand VII. All of them believed that, according to the retroversion of the sovereignty to the people, in the absence of the rightful king sovereignty returned to the people, which would be capable to appoint their own leaders. They did not agree on who was that people, and which territorial extension had the sovereignty. Royalists thought that it applied to the people on European Spain, who had the right to rule over all the Spanish empire. The leaders of the May Revolution thought that it applied to all the capitals of Spanish kingdoms. José Gervasio Artigas would lead later a third perspective: the retroversion applied to all regions, which should remain united under a confederative system. The three groups battled one another, but the disputes about the national organization of Argentina (either centralist or confederal) continued in Argentine Civil War, for many years after the end of the war of independence.
The Primera Junta sent military campaigns in the viceroyalty, in order to secure support to the new authorities and retain the authority held as the capital of the viceroyalty. The victories and defeats of the military conflict delimited the areas of influence of the new United Provinces of the Río de la Plata. With the non-aggression pact arranged with Paraguay early on, most of the initial conflict took place in the north, in Upper Peru, and in the east, in the Banda Oriental. In the second half of the decade, with the capture of Montevideo and the stalemate in Upper Peru, the conflict moved to the west, to Chile.
The first two military campaigns ordered by the revolutionary Junta in Buenos Aires were launched against Cordoba, where former Viceroy Santiago de Liniers organized a counter-revolution, and the Intendency of Paraguay, which did not recognize the outcome of events at the May Revolution.