Economy of Peru to respond to the sudden massive Chilean invasion. In Bolivia's capital La Paz top Bolivian authorities were outraged, and so announced that a state of war existed, thus invoking its 1873 secret military alliance treaty with Peru. Bolivia called on Lima to activate their secret mutual defense pact, while Chile waited for Peru to respond to Bolivia's demand and see if Peru declared its neutrality or not. However, Peru's Prado president and his top officials were warned by the Peruvian military that if Peru declared its neutrality, Chile will use this statement to convince Bolivia to jointly declare war on
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