 In 1811, he was one of the officers in charge of putting down the Figueroa mutiny, as aide-de-camp of the Grenadiers regiment.He participated in all the campaigns of the "Patria Vieja" (1811-1814), and after the defeat of Rancagua, he was left stranded between the Royalist armies.Captured by the Spanish authorities, he was exiled to the Juan Fernández Islands, where he remained imprisoned until after the victory of Maipu.