Peru Antonio José de Sucre they defeated the larger Spanish army in the Battle of Junín on 6 August 1824 and the decisive Battle of Ayacucho on 9 December of the same year, consolidating the independence of Peru and Alto Peru. Alto Peru was later established as Bolivia. During the early years of the Republic, endemic struggles for power between military leaders caused political instability. From the 1840s to the 1860s, Peru enjoyed a period of stability under the presidency of Ramón Castilla, through increased state revenues from guano exports. However, by the 1870s, these resources had been depleted, the country
First Upper Peru campaign richest cities of Upper Peru, an open cabildo calls Goyeneche to withdraw from their territory, which he obeys as he did not have military strength to prevail. The Bishop of La Paz, Remigio La Santa y Ortega, flees with him. Castelli is received in Potosí, where he required an oath of allegiance to the Junta and the surrender of the royalist generals Francisco de Paula Sanz and José de Córdoba y Rojas. He arranged that the operation to capture Vicente Nieto was carried out exclusively by the surviving patricians at the mines of Potosi, who had been incorporated with honors