The United States and Mexico have not fought a war since the Mexican-American War, which lasted from 1846 to 1848.