In 1846, Arista was given command of the Army of the North and sent to expel American troops from territory claimed by Mexico in Texas. The resulting engagement ignited the bloody Mexican–American War of 1846–1848. Arista was in command of Mexican forces during the Battle of Palo Alto and the Battle of Resaca de la Palma, where he was defeated, due largely to superior U.S. artillery.