He entered the Spanish colonial army and served as one of the Creole supporters of the Spanish government until 1821, when Iturbide made him governor of Vera Cruz. At first a supporter of the Federal Party, he subsequently overthrew (1822) Iturbide and himself became (1833) President of Mexico. His policies led to the uprising at Alamo, to his defeat and capture in the battle of San Jacinto (1836), and to the secession of Texas. He was released, and returned to Vera Cruz, where he defended the city against the French (1836–39). In his next presidential tenure during the early 1840s, he discarded the liberal constitution of 1824 and ruled as a dictator. Subsequently, despite defeat in the Mexican–American War and the loss of half of Mexico’s territory to the USA, Santa Anna was recalled to the presidency in 1853 by Mexican conservatives. In 1855 the liberal revolution of Ayutla deposed him.