Chile–Peru relations Peru had a secret defensive alliance with Bolivia, Peru did not declare war on Chile even after Chile invaded the Bolivian port of Antofagasta. War was not declared formally until Chile declared war on both Peru and Bolivia in 1879. Peru declared war on Chile the following day. The war resulted in a Chilean invasion of Peru and the destruction of various Peruvian buildings, cities, a major raid and a two-year occupation of the capital of Peru, Lima. The ultimate result of the war left a deep scar on the three societies involved, and the relations between Peru and Chile
Viceroyalty of Peru on July 21, 1821. The independence of Peru was proclaimed on July 28, 1821. Viceroy José de la Serna e Hinojosa, still in command of a sizable military force, retired to Jauja, and later to Cusco. On July 26, 1822, San Martín and Simón Bolívar met in Guayaquil to define a strategy for the liberation of the rest of Peru. The meeting was secret, and exactly what occurred is not known. However, afterwards San Martín returned to Argentina while Bolívar prepared to launch an offensive against the remaining royalist forces in Peru and Upper Peru (Bolivia). In September 1823 Bolívar