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
History of Peru since most of the presidents that ruled the country were from the social elite. During Augusto B. Leguía's periods in government [1908–1912 and 1919–1930, the latter known as the "Oncenio" (the "Eleventh")], the entrance of American capital became general and the bourgeoisie was favored. This policy, along with increased dependence on foreign investment, focused opposition from the most progressive sectors of Peruvian society against the landowner oligarchy. There was a final peace treaty in 1929, signed between Peru and Chile and called the Treaty of Lima by which Tacna returned to Peru and Peru yielded permanently the formerly rich provinces