Career
He became Count at the death of his father in 1816, at the young age of 18. He fought with the Spanish Army against independence, and went into exile in Perú with the remains of the Royalist army after the defeat at the Battle of Chacabuco in 1817, while the pro-independence government confiscated all his properties. He returned the next year with the army of Brigadier Mariano Osorio, of whom he had become personal adjuntant.