In 1847, Salas was promoted to general of division. As second in command of the Ejército del Norte (Northern Army), he fought the Americans in the Mexican–American War. He was taken prisoner at the Battle of Contreras (Padierna) on 20 August 1847. After the peace treaty, he was named military commander and governor of Querétaro.