The Liberation of Peru was one of the last offensives of the South American revolutions as Simon Bolívar gathered an army to cross the Peruvian Andes and defeat the last royalist army in South America.
After the Battle of Junín, in which the Bolivarian troops overcame the Spaniards, Bolívar was called back to Colombia to reassume his role as president. In Lima, he made a call on the Panama Congress before returning to Bogota.
On 6th December, 1824, liberation troops under control of Antonio José de Sucre win over the last royalist army in Ayacucho.
Despite the capitulation of the royalist army, dispersed corps of Spanish troops remained in South America. Sucre was charged with pursuing and eradicating these remnants.