The Mexican–American War, also known as the Mexican War, the U.S.–Mexican War, the Invasion of Mexico, the U.S. Intervention, or the United States War Against Mexico, was an armed conflict between the United States of America and the United Mexican States from 1846 to 1848 in the wake of the 1845 U.S. annexation of Texas, which Mexico considered part of its territory despite the 1836 Texas Revolution.
Combat operations lasted a year and a half, from the Spring of 1846 to the Fall of 1847. American forces quickly occupied New Mexico and California, then invaded parts of Northeastern Mexico and Northwest Mexico; meanwhile, the Pacific Squadron conducted a blockade, and took control of several garrisons on the Pacific coast further south in Baja California. Another American army captured Mexico City, and the war ended in a victory for the United States.
The Treaty of Guadalupe Hidalgo specified the major consequence of the war: the forced Mexican Cession of the territories of Alta California and New Mexico to the United States in exchange for $15 million. In addition, the United States assumed $3.25 million of debt owed by the Mexican government to U.S. citizens. Mexico accepted the loss of Texas and thereafter cited the Rio Grande as its national border.