After the Treaty of Guadalupe-Hidalgo was ratified on February 2, 1848, the southern portion of New Mexico and Arizona largely remained in Mexico, with most of the border in what is current day Arizona to be set at the Gila River. In New Mexico, things were a big more complicated as the town of Las Cruces remained in the Union yet the town of la Mesilla, which at the of of ratification remained across the Rio Grande but in Mexico. The Treaty of Guadalupe Hidalgo left somethings unresolved, namely, ownership of the Mesilla Valley and protection for Mexico from raids from the Apache and Comanche tribes.
The Gadsden Purchase, ratified by the US Senate on April 25, 1854, was the USA’s last continental land acquisition. It comprised of nearly 30,000 square-miles, most in Arizona, though an important portion was in New Mexico, the Mesilla Valley.
That Gadsden Purchase is also known as “la Vente de La Mesilla” or “The Sale of Mesilla.” Mesilla, New Mexico, was important because, just the same as the countries disputed the ownership of the land in between the Nueces and the Rio Grande, Mexico and USA disputed ownership of the Mesilla Valley. Fearing another war and losing even more land, General Santa Ana sold to the Gringos the Gadsden Purchase for a whopping ten million dollars.
In 1853, President Pierce sent James Gadsden to negotiate with Mexico’s General Santa Ana for the land. The USA wanted a port in the Gulf of California and a flatter route for a Southern Transcontinental Railroad.
The Text of the Gadsden Treaty is relatively straightforward and can be found below and here. Clause 1 changed the border and Clause 3 provided for the cost of acquisition.