 Also in the presidential cabinet he had to occupy temporarily the Ministry of Interior twice over 1838.Jose Joaquin de Herrera, interim president of the Republic, reappointed him Foreign Secretary in December 1844, a position he held until August the following year.He defended before the Mexican Congress the Treaty of Guadalupe Hidalgo, in which he took part in negotiations as one of the three Mexican representatives and by which peace was agreed on 2 February 1848 after the Mexican–American War.