On 2 February 1948 American and Mexican representatives signed the Treaty of Guadalupe Hidalgo – officially the Treaty of Peace, Friendship, Limits and Settlement between the United States of America and the Mexican Republic – to end the Mexican War.
After the U.S. Army forces commanded by Major General Winfield Scott defeated the army of General Antonio Lopez de Santa Anna in a series of battles, Mexican forces evacuated Mexico City, which surrendered to the Americans on 14 September 1847.
Although the Mexican regulars were in retreat, the Americans contended with the independent Light Corps partisans in the countryside, plus other irregulars, armed citizens and criminals in the city that Santa Anna had released from the prisons. American troops engaged in counter-insurgency operations as well as fighting remnants of the Mexican army through most of the winter.
In the absence of a central government, the Army also had to contend with ethnic violence as it restored order and administered civil government while State Department representative Nicholas Trent negotiated with Mexican political leaders.
When the treaty was signed, Mexico recognized U.S. sovereignty in Texas with the Rio Grande as its southern border, and agreed to cede territory in what became the states of Arizona, California, Nevada, New Mexico and Utah, plus portions of Colorado, Nebraska, Oklahoma, and Wyoming. In return, the U.S. promised Mexico $15 million in gold and to assume claims by U.S. citizens against Mexico.
While waiting for both governments to ratify the treaty, negotiators proclaimed a truce on 6 March which ended operations of the Light Corps. The U.S. government also agreed to a stabilization plan to rebuild and support the new Mexican government against internal rebellions, while Mexico ordered all guerillas operating against American forces to disband.