Pedro Bernardino María de Anaya y Álvarez (20 May 1795 – 21 March 1854) was a Mexican soldier who served twice as interim president of Mexico during the Mexican-American War. Inbetween presidencies, he directly participated in the fighting as an officer, distinguishing himself at the Battle of Churubusco. Early life Pedro Maria Anaya was born in the town of Huichapam in 1795 and began his military career in June 1811, joining the Regiment of Tres Villas as a cadet when the Mexican War of Independence had already begun. He had reached the rank of captain by 1819, and initially fought on the side of the Spanish, having fought in twenty battles as part of his hometown company the Dragoons of Sierra Gorda, when he decided to switch sides on June 20, 1821 to join Agustin de Iturbide’s Plan of Iguala. He was assigned to march with General Vicente Filísola to Guatemala, and in 1823 was promoted to squadron commander, and five years later was a lieutenant colonel. During the presidency of Valentin Gomez Farias he was promoted to brigadier general for having been loyal to the liberal party. After this Anaya occupied civilian posts, including a stint as administrator of the postal service. Under President Jose Joaquin Herrera he was appointed Minister of War from August to December 1845, during a time when war ministers were repeatedly resigning due to fears of going against the popular sentiments favoring a war with the United States as opposed to President Herrera’s more moderate course. After the fall of the Herrera government in December, 1845, Anaya retired from publics, as he was against President Mariano Paredes’ policies. When Gomez Farias returned to the presidency in 1847, Anaya was president of the congress and he signed Gomez Farias’ controversial wartime decree nationalizing church lands. First presidency When the Revolt of the Polkos subsequently broke out, Anaya stood behind Gomez Farias, but Santa Anna arrived to moderate a solution between the two factions and deposed Gomez Farias, Anaya was chosen as the interim president while Santa Anna went to deal with the American expeditionary force that had landed at Veracruz. Anaya was authorized by congress to place the capital under a state of siege and he had to work very hard to fight the provincialism that served as an obstacle against a united war effort, with states resisting to contribute as much as they could,