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
José Bernardo de Tagle y Portocarrero, Marquis of Torre Tagle member of the triumvirate under José de La Mar. In January 1823, the congress appointed him president, but a military mutiny deposed him and proclaimed José de la Riva Agüero president on 28 February. After the deposition of Riva Agüero and his retreat to Trujillo, Torre Tagle was appointed president by Antonio José de Sucre on 20 July, and elected by the congress on 16 August, and Bolivar, who on his arrival 1 September had been proclaimed dictator, left him in charge of the government. During his tenure, the Peruvian flag, which had been established by José de San Martín,