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 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