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.
[citation needed] 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.
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.
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.
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.
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.
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.
[12] 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.
Colonel Francisco Ortiz de Ocampo, who led the patriot army, captured Liniers and the other leaders of the Cordoba counter-revolution on 6 August 1810, but, instead of executing them as he was instructed, he sent them back to Buenos Aires as prisoners.
The resistance of patriot republiqueta guerrillas of Upper Peru, however, kept the royalists at bay, hampering any serious advance to the south: The other militia sent by Buenos Aires was commanded by Manuel Belgrano and made its way up the Paraná River towards the Intendency of Paraguay.
This new government decided to promote a new campaign to the Upper Peru with a reorganized Army of the North and appointed José de San Martín, a veteran of the Napoleonic Wars who had recently arrived from Spain, as lieutenant colonel.
San Martín was ordered to create the professional and disciplined cavalry unit known as Regiment of Mounted Grenadiers (Spanish: Granaderos a caballo): General Manuel Belgrano was appointed as the new commander of the Army of the North.
Facing the overwhelming invasion of a royalist army led by General Pío de Tristán, Belgrano turned to scorched-earth tactics and ordered the evacuation of the people of Jujuy and Salta, and the burning of anything else left behind to prevent enemy forces from getting supplies or taking prisoners from those cities.
One of the first actions of Posadas was to create a naval fleet from scratch, which was to be financed by Juan Larrea, and appointed William Brown as lieutenant colonel and chief commander of it, on March 1, 1814.
The fall of Montevideo eliminated the royalist menace from the Banda Oriental and meant the actual end of the Spanish Viceroyalty of the Río de la Plata.
Soon afterwards, William Brown was awarded the rank of admiral, and Carlos María de Alvear, who was put in charge of the siege of Montevideo just a few days before the surrender of the city, succeeded his uncle Gervasio Posadas as the Supreme Director of the United Provinces, on January 11, 1815.
Furthermore, King Ferdinand VII was restored to the Spanish throne on 1813, so an urgent decision was needed regarding the political status of the United Provinces.
On July 9, 1816, an assembly of representatives of the Provinces (including three Upper Peru departments but excluding representatives from Santa Fe, Entre Ríos, Corrientes and the Banda Oriental, united into the Federal League) met at the Congress of Tucumán and declared the Independence of the United Provinces in South America from the Spanish Crown, with provisions for a national Constitution.
On April 4, Argentine Colonel Juan Gregorio de Las Heras had occupied Concepción, but the Royalists retreated to Talcahuano.
Crippled after his defeat at Cancha Rayada, O'Higgins delegated the command of the troops entirely to San Martín in a meeting on the plains of Maipú.
Then, on April 5, 1818, San Martín inflicted a decisive defeat on Osorio in the Battle of Maipú, after which the depleted royalists retreated to Concepcion, never again to launch a major offensive against Santiago.
However, defensive actions continued to be carried on in the northern frontier of the United Provinces until the 1825 Battle of Ayacucho, which ended the royalist threat from the Upper Peru.