In 1848, the war between the United States and Mexico formally ended with the signing of the Treaty of Guadalupe Hidalgo. It provided for Mexico’s cession of the territory that became the states of New Mexico, Arizona, California, Nevada, Utah and parts of Colorado and Wyoming in exchange for $15 million.
That’s almost $600 million in today’s money, or to think of another way, about 500 tons of silver, but while the US paid something to Mexico in compensation, the real reason for the treaty was the United States winning the Mexican War.