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
Flag of Peru on battleships, usually with the ensign of the highest-rank officer on board above it. During the Viceroyalty of Peru, the colonial-era Spanish flag flew over Peru. In 1820, during the struggle for independence, British-born General William Miller hoisted in Tacna the first flag that represented the emerging country. Though the original flag itself is now lost, it was described as navy blue, defaced with a golden sun representing Inti. The first flag of the Republic of Peru was created by General José de San Martín, and officially decreed on 21 October 1820. It is diagonally quartered, with white upper and