Santa Anna and Maximilian

In the first 33 years of the republic, the presidency changed hands 37 times (counting acting presidents). Only one president served his full term. Antonio Lopez de Santa Anna, who helped depose Iturbide, became a hero in 1829 when he repulsed a Spanish attack. In 1833 he became president for the first of seven times in 22 years. Santa Anna had little understanding of the welfare of the country, and under him Mexico remained in turmoil.

In 1821 United States settlers had been permitted to move into Texas. In 1836 they declared Texas a republic. Santa Anna led his troops against the uprising, but was defeated at San Jacinto by Sam Houston. Texas remained independent until it joined the United States in 1845, an event that led to the Mexican War. In 1848 Mexico ceded California and most of the remaining territory that now makes up the southwestern United States.

In spite of a growing liberal movement in which Benito Juarez, governor of Oaxaca, was a leading figure, Santa Anna again became head of government in 1853. He ruled as a dictator for two years, during which he sold additional territory to the United States. In 1855 the liberals deposed him and reorganized the government. A new constitution, containing provisions intended to achieve social and economic reforms, was adopted in 1857. These provisions alienated the conservatives—the church, the army, and the landowners—who the next year seized Mexico City, deposed President Ignacio Comonfort, and named General Felix Zuloaga president. The liberals fled to Veracruz and set up a rival government with Juarez as president.

The War of the Reform, a civil war between the two factions, ended in victory for Juarez in 1861. Foreign business interests suffered property losses, and in 1862 France, Spain, and Great Britain landed troops in Mexico. The two latter countries soon withdrew, and the French occupied Mexico City. France's action was contrary to the Monroe Doctrine, but the United States was engaged in the Civil War and was unable to intervene. In 1864 Napoleon III made Archduke Maximilian of Austria emperor of Mexico. The following year the Civil War ended and the United States sent troops to the border and demanded that France withdraw its troops. Napoleon III complied in 1867, and Maximilian was deposed, tried, and put to death.