On February 2, 1848, the Treaty of Guadalupe Hidalgo was signed between the U.S. and Mexico.
The treaty called for the United States to pay $15 million USD to Mexico and to pay off the claims of American citizens against Mexico up to $5 million USD. It gave the United States the Rio Grande as a boundary for Texas. It also gave the U.S. ownership of California, and a large area comprising roughly half of New Mexico, most of Arizona, Nevada, and Utah and Colorado.
Mexicans in those annexed areas had the choice of relocating to within Mexico’s new boundaries or receiving American citizenship with full civil rights.