The Mexican–American War, also known as the Mexican War, the U.S.–Mexican War or the Invasion of Mexico, was an armed conflict between the United States of America and the United Mexican States from 1846 to 1848.