He joined the Army in 1810 as a lieutenant of the Grenadier Regiment of Infantry. He helped quell the mutiny of Colonel Thomas Figueroa on 1 April 1811 (the Figueroa Mutiny). He participated in the campaigns of the south until 1812. After the Disaster of Rancagua in 1814, he emigrated to Mendoza, Argentina, joining the Army of the Andes. He fought in the Battle of Chacabuco in 1817.