The Mexican–American War, also known in the United States as the Mexican War and in Mexico as the United States intervention in Mexico, (April 25, 1846 – February 2, 1848) was an invasion of Mexico by the United States. It followed the 1845 American annexation of Texas, which Mexico still considered its territory because it refused to recognize the Treaties of Velasco, signed by President Antonio López de Santa Anna after he was captured by the Texian Army during the 1836 Texas Revolution. The Republic of Texas was de facto an independent country, but most of its Anglo-American citizens who had moved from the United States to Texas after 1822 wanted to be annexed by the United States.

Sectional politics over slavery in the United States had previously prevented annexation because Texas would have been admitted as a slave state, upsetting the balance of power between Northern free states and Southern slave states. In the 1844 United States presidential election, Democrat James K. Polk was elected on a platform of expanding U.S. territory to Oregon, California (also Mexican territory), and Texas by any means, with the 1845 annexation of Texas furthering that goal. However, the boundary between Texas and Mexico was disputed, with the Republic of Texas and the U.S. asserting it to be the Rio Grande and Mexico claiming it to be the more northerly Nueces River. Polk sent a diplomatic mission to Mexico in an attempt to buy the disputed territory, together with California and everything in between for $25million (equivalent to $ million in ), an offer the Mexican government refused. Polk then sent a group of 80 soldiers across the disputed territory to the Rio Grande, ignoring Mexican demands to withdraw. Mexican forces interpreted this as an attack and repelled the U.S. forces on April 25, 1846, a move that Polk used to convince the Congress of the United States to declare war.

Beyond the disputed area of Texas, U.S. forces quickly occupied the regional capital of Santa Fe de Nuevo México along the upper Rio Grande. U.S. forces also moved against the province of Alta California and then turned south. The Pacific Squadron of the U.S. Navy blockaded the Pacific coast in the lower Baja California Territory. The U.S. Army, under Major General Winfield Scott, invaded the Mexican heartland via an amphibious landing at the port of Veracruz on March 9 and captured the capital, Mexico City, in September 1847. Although Mexico was defeated on the battlefield, negotiating peace was politically complex. Some Mexican factions refused to consider any recognition of its loss of territory. Although Polk formally relieved his peace envoy, Nicholas Trist, of his post as negotiator, Trist ignored the order and successfully concluded the 1848 Treaty of Guadalupe Hidalgo. It ended the war, and Mexico recognized the cession of present-day Texas, California, Nevada, and Utah as well as parts of present-day Arizona, Colorado, New Mexico, and Wyoming. The U.S. agreed to pay $15 million (equivalent to $ million in ) for the physical damage of the war and assumed $3.25 million of debt already owed by the Mexican government to U.S. citizens. Mexico relinquished its claims on Texas and accepted the Rio Grande as its northern border with the United States.

The victory and territorial expansion Polk had spearheaded inspired patriotism among some sections of the United States, but the war and treaty drew fierce criticism for the casualties, monetary cost, and heavy-handedness. The question of how to treat the new acquisitions intensified the debate over slavery in the United States. Some scholars see the Mexican–American War as leading to the American Civil War. Many officers who had trained at West Point gained experience in the war and later played prominent leadership roles during the Civil War. In Mexico, the war worsened domestic political turmoil and led to a loss of national prestige, as it suffered large losses of life in both its military and civilian population, had its financial foundations undermined, and lost more than half of its territory.

Background

Mexico after independence from Spain

Mexico obtained independence from Spain’s Spanish Empire with the Treaty of Córdoba in 1821 after a decade of conflict between the Spanish royal army and Mexican insurgents for independence, with no foreign intervention. The conflict ruined the silver-mining districts of Zacatecas and Guanajuato. Mexico began as a sovereign nation with its future financial stability from its main export destroyed. Mexico briefly experimented with monarchy, but became a republic in 1824. This government was characterized by instability, and it was ill-prepared for a major international conflict when war broke out with the U.S. in 1846. Mexico had successfully resisted Spanish attempts to reconquer its former viceroyalty in the 1820s and resisted the French in the so-called Pastry War of 1838 but the secessionists' success in Texas and the Yucatán against the centralist government of Mexico showed its political weakness as the government changed hands multiple times. The Mexican military and the Catholic Church in Mexico, both privileged institutions with conservative political views, were stronger politically than the Mexican state.

U.S. expansionism

The United States' 1803 Louisiana Purchase resulted in an undefined border between Spanish colonial territories and the U.S. Some of the boundary issues between the U.S. and Spain were resolved with the Adams-Onís Treaty of 1818. U.S. negotiator John Quincy Adams wanted clear possession of East Florida and establishment of U.S. claims above the 42nd parallel, while Spain sought to limit U.S. expansion into what is now the American Southwest. The U.S. sought to purchase territory from Mexico, starting in 1825, in order to settle some of these issues. U.S. President Andrew Jackson made a sustained effort to acquire northern Mexican territory, with no success.Schoultz, Beneath the United States, pp. 19–20

Historian Peter Guardino states that,"the greatest advantage the United States had was its prosperity."Guardino, The Dead March, p. 6 With the Industrial Revolution across the Atlantic increasing the demand for cotton for textile factories, there was a large external market for cotton produced by enslaved African-American labor in the southern states. This demand helped fuel expansion into northern Mexico. Although there were political conflicts in the U.S., they were largely contained by the framework of the constitution and did not result in revolution or rebellion by 1846, but rather in sectional political conflicts. Northerners in the U.S. sought to develop the country's existing resources and expand the industrial sector without expanding the nation's territory. The existing balance of sectional interests would be disrupted by the expansion of slavery into new territory. The Democratic Party, to which President James K Polk belonged, in particular had strongly supported U.S. expansion.Guardino, The Dead March, pp. 18–22

Historian Rachel John argues that Americans and the United States government viewed this opportunity through an ideological lens. As a new nation seen as an experiment, the United States sought to gain prestige and demonstrate its power. Mexico's failure to control its territory—such as its inability to maintain control over Texas—made it vulnerable and viewed as a target. With a stronger military capability, the United States was in a position of power, enabling it to fulfill these ideological goals.

Guardino argues racial and gender-based stereotypes against the Mexicans, such as their being displayed as more feminine compared to the Americans' sense of masculinity and superiority over the Mexicans, contributed to the war and the ideals of American expansionism.

Instability in northern Mexico

Neither colonial Mexico nor the newly sovereign Mexican state effectively controlled Mexico's far north and west. Mexico's military and diplomatic capabilities declined after it attained independence from Spain in 1821 and left the northern half of the country vulnerable to attacks by Comanche, Apache, and Navajo Native Americans. The Comanche, in particular, took advantage of the weakness of the Mexican nation to undertake large-scale raids hundreds of miles into the country to acquire livestock for their own use and to supply an expanding market in Texas and the U.S.DeLay, Brian (Feb 2007), "Independent Indians and the U.S. Mexican War" The American Historical Review, Vol. 112, No. 2, p. 35.

The northern area of Mexico was sparsely settled because of its challenging climate and topography. Mostly high desert with scarce rainfall, it supported little sedentary agriculture during the pre-Hispanic and colonial periods. After independence, Mexico became preoccupied with internal struggles that sometimes verged on civil war, and the worsening situation on the northern frontier was largely neglected. In northern Mexico, the end of Spanish rule was marked by the end of financing for garrisoned presidios and the pay-offs to Native Americans to maintain peace. In the absence of effective governance, Comanche and Apache took to raiding for livestock and looted much of the northern countryside outside of the scattered towns. The raids after 1821 resulted in many deaths, halted most transportation and communications, and decimated the ranching industry that was a mainstay of the northern economy. As a result, the demoralized civilian population of northern Mexico put up little resistance to the invading U.S. army.

Furthermore, distance and hostile activity by Native Americans made communications and trade between the heartland of Mexico and provinces such as Alta California and New Mexico increasingly difficult. As a result, at the outbreak of the war, New Mexico was economically dependent on trade with the United States via the eastern branch of the Santa Fe Trail."The Borderlands on the Eve of War" (). The U.S.–Mexican War. PBS. The Mexican government, being overstretched, failed to influence and control its claimed territories. However, it was viewed as a great potential source of wealth by the Mexicans, whilst American settlers believed it was their nation's destiny to claim this land and that its acquisition would secure the United States' position from European colonial empires.

The Mexican government's policy of allowing the settlement of U.S. citizens in its province of Tejas was aimed at expanding control into Comanche lands, the Comancheria. However, rather than settling in the dangerous central and western parts of the province, Anglos preferred to settle in East Texas with its rich farmland contiguous with the southern U.S. slave states. As settlers poured in from the U.S., the Mexican government discouraged further migration with its 1829 abolition of slavery.

Foreign designs on California

During the Spanish colonial era, the Californias (i.e., the Baja California peninsula and Alta California) were sparsely settled. After Mexico became independent, it shut down the missions and reduced its military presence. In 1842, the U.S. minister in Mexico, Waddy Thompson Jr., suggested Mexico might be willing to cede Alta California to the U.S. to settle debts, saying: "As to Texas, I regard it as of very little value compared with California, the richest, the most beautiful, and the healthiest country in the world ... with the acquisition of Upper California we should have the same ascendency on the Pacific ... France and England both have had their eyes upon it."