United States declared war on Mexico in 1846. However, General Zachary Taylor had crossed the border and established a fort several months before. The Treaty of Guadalupe Hidalgo, signed on February 2, 1848, ended the war. Lands gained by the United States included California, Nevada, Utah, and parts of Arizona, New Mexico, Colorado, and Wyoming. The Gadsden Purchase, finalized on December 30, 1853, bought more land from Mexico that is today Arizona and New Mexico.