Viceroyalty of Peru arrived in Lima with Antonio José de Sucre to plan the offensive. In February 1824 the royalists briefly regained control of Lima. Olañeta's Rebellion started by surprise and the entire royalist army of Upper Peru (today's Bolivia) revolted, led by Pedro Antonio Olañeta (royalist) against La Serna, the viceroy of Peru (a liberal). This broke the royal army and started a civil war in Upper Peru. Having regrouped in Trujillo, Bolívar in June led his rebel forces south to confront the Spanish under Field Marshal José de Canterac. The two armies met on the plains of Junín on August 6,
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