The Mexican–American War, also known as the Mexican War, the U.S.–Mexican War, the U.S.–Mexico War or the Invasion of Mexico (Spanish: Intervención estadounidense en México, Guerra de Estados Unidos-México), was an armed conflict between the United States of America and the United Mexican States from 1846 to 1848. It followed in the wake of the 1845 U.S. annexation of Texas, which Mexico considered part of its territory in spite of its de facto secession in the 1836 Texas Revolution.