Question: who was the president of mexico in 1848
Answer: Vice President Valentín Gómez Farías 17 Pedro María de Anaya ( 1795 -- 1854 ) April 2 , 1847 May 20 , 1847 Liberal Party Santa Anna left office to fight in the Mexican -- American War .