History of Chile the Spaniards at the Battle of Chacabuco on February 12 and marking the beginning of the "Patria Nueva". San Martín considered the liberation of Chile a strategic stepping-stone to the emancipation of Peru, which he saw as the key to hemispheric victory over the Spanish. Chile won its formal independence when San Martín defeated the last large Spanish force on Chilean soil at the Battle of Maipú on April 5, 1818. San Martín then led his Argentine and Chilean followers north to liberate Peru; and fighting continued in Chile's southern provinces, the bastion of the royalists, until 1826. A declaration
Army of the North of the Royalist forces in Upper Peru. On 12 May Orozco commanding a force of 4,000 men advanced to Jujuy, and on 28 May occupied the city, then on 31 May occupied Salta. On 2 June the royalist forces defeated the patriots at Chamical (southwest of the city of Salta). At the battle of Las Cañas lieutenant colonel Rojas was killed but the force of 400 royalists was defeated. On 8 June there was a new independentist victory at Cuesta de la Pedrera (southeast of Salta), dispersing 2,000 royalists who retreated to Jujuy. At the battle of Yala another royalist