 In 1858, he was made treasurer of the State of Puebla and prefect of the Department of Zacatlán.He fought in the Battle of Puebla against the French on 5 May 1862 and took part in the defense of the city during the subsequent siege.On 27 July 1863, he was promoted to brigadier general.