The Mexican-American War was a conflict between the United States and Mexico that lasted from 1846 to 1848. The war began after a border dispute between Texas, which had recently been annexed by the United States, and Mexico. The Mexican government refused to recognize Texas as a sovereign nation and claimed that the border between Texas and Mexico was the Nueces River, while the United States claimed that the border was the Rio Grande.
In April 1846, a detachment of American troops under the command of General Zachary Taylor clashed with Mexican troops near the Rio Grande. The following month, President James K. Polk asked Congress to declare war on Mexico, claiming that Mexican troops had "invaded our territory and shed American blood upon the American soil."
The Mexican-American War was fought on several fronts, with American troops invading Mexico from both the north and the south. The war ended in 1848 with the Treaty of Guadalupe Hidalgo, which recognized the Rio Grande as the border between Texas and Mexico and ceded California, Nevada, Utah, and parts of Arizona, Colorado, New Mexico, and Wyoming to the United States.
The Mexican-American War was controversial at the time, with many Americans opposed to the conflict. Some saw it as an attempt by the United States to expand its territory, while others believed that it was a war of aggression against a weaker neighbor. The war also had long-term consequences for both the United States and Mexico, shaping the political and cultural landscape of both countries for decades to come.