1846 to 1848: During the Mexican–American War, Mexico and the United States warred over Texas, California and what today is the American Southwest but was then part of Mexico. During this war, U.S. troops invaded and occupied parts of Mexico, including Veracruz and Mexico City.