That process was confirmed in the Mexican–American War of 1846–1848, in which the United States, following a skirmish between Mexican and U.S. forces in land disputed between Mexico and the U.S., invaded Mexico. The war, which included the deployment of U.S. forces into Mexico, the taking of Veracruz by sea, and the occupation of Mexico City by American troops (which finally resulted in Mexico's defeat), stunned much of the world. In the peace treaty (Treaty of Guadelupe Hidalgo) that followed, the U.S. annexed the northern half of Mexico, comprising what is now the Southwestern United States.