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
Protectorate of Peru independence of Peru by José de San Martín on July 28, 1821. During the Peninsular War (1807–1814) central authority in the Spanish Empire was lost and many regions established autonomous juntas. The viceroy of Peru, José Fernando de Abascal y Sousa was instrumental in organizing armies to suppress uprisings in Upper Peru and defending the region from armies sent by the juntas of the Río de la Plata. After success of the royalist armies, Abascal annexed Upper Peru to the viceroyalty, which benefited the Lima merchants as trade from the silver-rich region was now directed to the Pacific. Because of