He was promoted to brevet major after the Battle of Cerro Gordo on April 18, 1847. He also fought at Contreras, Churubusco, and Chapultepec and was wounded at the last. By the end of the war, he had received additional brevet promotions to lieutenant colonel and colonel, but his permanent rank was still captain of engineers, and he would remain a captain until his transfer to the cavalry in 1855.