The Mexican-American War was an armed military conflict between the United States and Mexico from 1846 to 1848 in the wake of the 1845 U.S. annexation of Texas. Mexico did not recognize the secession and subsequent military victory by Texas in 1836; it considered Texas a rebel province.
In the United States, the war was a partisan issue, with most Whigs opposing it and most southern Democrats, animated by a popular belief in the Manifest Destiny, supporting it. In Mexico, the war was considered a matter of national pride.
The most important consequence of the war for the United States was the Mexican Cession, in which the Mexican territories of Alta California and Santa Fé de Nuevo México were ceded to the United States under the terms of the Treaty of Guadalupe Hidalgo. In Mexico, the enormous loss of territory following the war encouraged its government to enact policies to colonize its northern territories as a hedge against further losses.