Bolivia–Spain relations and Antonio José de Sucre entered Peru and defeated the Spanish forces in the country. Soon afterwards, troops led by Antonio José de Sucre entered Upper Peru and fought against royalist forces. By 1825, Upper Peru was free from Spanish authority. Originally, Bolívar wanted Upper Peru to join either Peru or Argentina, however, the people of Upper Peru convinced Bolívar and Sucre to give autonomy to the territory and on 6 August 1825, an Upper Peruvian congress declared the country independent and renamed the territory "Bolivia" in honor of Simón Bolívar and named its capital "Sucre" in honor of Antonio
History of Peru achieved only in the early 1900s. In 1894, Nicolás de Piérola, after allying his party with the Civil Party of Peru to organize guerrilla fighters to occupy Lima, ousted Andrés Avelino Cáceres and once again became president of Peru in 1895. After a brief period in which the military once again controlled the country, civilian rule was permanently established with Pierola's election in 1895. His second term was successfully completed in 1899 and was marked by his reconstruction of a devastated Peru by initiating fiscal, military, religious, and civil reforms. Until the 1920s, this period was called the "Aristocratic Republic",