As commander of engineers he was present at the Battle of Cerro Gordo, being at the hill of El Telegrafo when the Americans were temporarily repulsed, remaining there until the Mexican forces were ultimately defeated.
[2] In 1852, he was Minister of War, but dissatisfied with the regime of Santa Anna, he resigned, and traveled through the United States, England, and the Ottoman Empire, making a study of fortresses, military, and scientific establishments.
[3] He returned to Mexico in September 1858, after the War of Reform had already begun, and offered his services to General Echeagaray, advising him to dig a trench around the liberal held Fortress of Perote in order to cut off its communications.
Dissatisfaction with Conservative president Zuolaga's handling of the war, and his inability to pass a new constitution caused Echeagaray to revolt against him through the Plan of Ayotla in December, 1858.
[6] A Junta of Notables in accordance with the Ayotla Plan did finally meet on December 30 presided over by Mariano Riva Palacio.
When it came time for the Junta to elect a president of the Republic, Robles Pezuela lost to General Miguel Miramon by four votes.
President Miramon made Robles governor and commander-general of Veracruz, and he went on to lead the Division of the East, taking charge of it on April 12, 1859.