The Mexican–American War was the armed conflict between the United States and Mexico that lasted from 1846 to 1848. The United States won the war and acquired a vast amount of territory that is now part of the United States, including California, Nevada, Utah, Arizona, New Mexico, and parts of Colorado and Wyoming. General Winfield Scott led the attack against Mexico City.