Once the American military had secured the Mexican capital, a diplomatic mission was sent to deal with the mutual misunderstanding of where the border was. Texas, all the way to the Rio Grande. And now that they had been forced to go through all this fighting and occupation, America was going to keep New Mexico and California. America was happy to buy all that territory at a fair price, and Mexico would be happy to sell them at a fair price. It turned out that Mexico was not necessarily happy to sell a third of their territory at half the price per acre the Americans had offered before the war, but they were willing to, in exchange for a treaty of peace and an end to the occupation. At which point, the Americans turned around, marched back north of the Rio Grande, and happily washed their hands of Mexican lands for the next two centuries. Mexico, not nearly so happy about the whole ordeal, spent the next two centuries dreaming of the day they could get their conquered and rebellious regions back.