Liberating Expedition of Peru

[2][3] The rebellion of Rafael del Riego of 1820 in Spain, made the threat of Spanish invasion of the Río de la Plata recede.

These events allowed the land forces of General San Martín to embark in Valparaíso, disembark at Paracas Bay on September 8, occupy the city of Lima, and proclaim the independence of Peru on July 28, 1821.

Following the self exile of San Martin in September 1822, and the military defeats under president José de la Riva Agüero, the congress decided to send a plea in 1823 for the help of Simón Bolívar.

After the disaster, the Chilean troops, along with the representatives of the government, fled to Mendoza, where they were received by the governor of the province of Cuyo, General José de San Martín, who then concocted a plan of liberation of the South American colonies of the Spanish Empire.

After the invasion and liberation of Chile, they would embark by sea to Peru to eliminate the Spanish presence in that region, since they were considered a big threat for the independence of other Latin Americans countries.

San Martín choose to disobey (see Acta de Rancagua) and O'Higgins decided that Chile would assume the costs of the Freedom Expedition of Perú.

[7]: 144 On the night of 5 November, Cochrane personally and 240 volunteers wearing white with blue armbands captured the Spanish frigate Esmeralda within the port of Callao.