Where to build a railroad linking Southern California and the East was crucial to Southerners. They feared the geography of the southwest would result in a railroad being built that would head northward and connect to the railroads of the North and not the south. They thus encouraged the government to purchase additional land from the government, in the area adjacent to New Mexico; specifically the Mesilla Valley.
James Gadsden was appointed the Ambassador to Mexico by President Pierce. He was given explicit instructions to negotiate the purchase of additional land from the Mexicans. There were two options just the area South of the New Mexican border and the Baja Peninsula in California. The ruler to Mexico was Santa Anna who was loath to give up land to the United States. On the other hand, he needed money. Santa Anna picked the least ground for the most money, and that was the land to the South of Arizona and New Mexico. An agreement was reached to purchase 38,000 sq miles of desert for $15 million. The treat was signed between Santa Anna and James Gadsden on December 30th, 1853. The treaty went into effect after being ratified by the Senate on one 30, 1854.