- In January 1817, San Martín crossed the Andes with the Army of the Andes and entered Chile.
- He defeated the Spanish royalist forces at the Battle of Chacabuco on February 12, 1817.
- On February 18, 1817, Chile declared independence from Spain.
- San Martín served as the Supreme Director of Chile from February 18, 1817, to September 9, 1818.
Peru:
- In September 1820, San Martín invaded Peru with the Army of the Andes.
- He captured Lima on July 12, 1821 and declared Peru "libre e independente"
- On July 28, 1821, Peru declared independence from Spain.
- San Martín served as the Protector of Peru from July 28, 1821, to September 20, 1822.