The Mexican-American War was a conflict between the United States and Mexico that lasted from 1846 to 1848, primarily over territorial disputes following the U.S. annexation of Texas. This war led to significant territorial gains for the U.S. and set the stage for future relations between the two nations, especially impacting Mexican Americans in the newly acquired territories.