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
Protectorate of Peru brigadier Mateo Pumacahua, who was curaca of Chinchero, and decades earlier had been instrumental in suppressing the rebellion of Túpac Amaru II. Pumacahua joined the Criollo leaders in forming a junta on August 3 in Cuzco, which demanded the complete implementation of the liberal reforms of the Spanish Constitution of 1812. After some victories in southern Peru and Upper Peru, the rebellion was squashed by mid-1815 when a combined strength of royal forces and loyal curacas, among which were the Catacora and Apo Cari took Cuzco and executed Pumacahua. After the squashing of the aforementioned rebellion, the Viceroy of Peru