Treaty of Guadalupe Hidalgo (archives.gov)
The war ended with the signing of the Treaty of Guadalupe Hidalgo. The treaty was signed in Northern Mexico City on February 2, 1848. The treaty detailed the separation of the boundaries of the United States and Mexico at the Gila River and the Rio Grande. The United States received what is now Arizona, California, western Colorado, Nevada, New Mexico, Texas, and Utah from Mexico for a payment of 15 million and in return the U.S. agreed to settle claims made against Mexico by U.S. Citizens (Encyclopedia Britannica).