The Mexican-American War was a war fought between the United States and Mexico between 1846 and 1848. It is also called the the US-Mexico War. In the USA it is also known as the Mexican War; in Mexico it is also known as the North American Invasion of Mexico, the United States War Against Mexico, and the War of Northern Agression (this last name more commonly used in the USA to refer to the American Civil War).

The war grew out of the Mexican conflict with Texas. After having won its independence from Mexico in 1836, the Republic of Texas was annexed by the United States in 1845; however, the Mexican government still considered Texas a part of their country. That same year the United States government offended Mexico by offering to purchase California and New Mexico from them.

An interesting sidenote of the war was the Saint Patrick's Battalion (San Patricios), a group, approximately 500-strong, of (largely Irish-born) Americans who deserted the US Army in favor of the Mexican side. Many of them fought against what they alleged was brutal, racist dicrimination received from the U.S. Many identified with Mexico as Catholics. They were hanged by the U.S.; making sure that the last thing these Irish men saw was the lowering of the Mexican flag and the raising of the U.S. flag as the war was won. Some historians claim that these men were prisoners of war. Other argue that they were traitors and deserters. There are many monuments to these soldiers in present-day Mexico.