Forget the Mexican War, President Pierce sent James Gadsden to Mexico in 1853 to buy land for a southern railroad. He purchased the area now comprising southern Arizona and part of southern New Mexico for $10,000,000. Mexico at the time, also wanted to sell even more land to the south of the Gadsden Purchase, including Baja California, but offer was refused for it was thought too barren.
http://www.yale.edu/lawweb/avalon/diplomacy/mexico/mx1853.htm