He supported the patriot side on the Chilean War of Independence, and in 1813 was promoted to Sergeant Major of Grenadiers. As such he participated with distinction in the Siege of Chillan (August 1813) where he was injured. On November 27, 1813, he was promoted to Colonel and named General Commander of Grenadiers in replacement of Juan José Carrera. The Government Junta put him in command of the defense of the city of Talca, where he died while at the head of his troops in the First Battle of Talca.