American troops capture Mexico City after heavy fighting, and the war ends. The Treaty of Guadalupe Hidalgo cedes Upper California and all the states of the present-day American Southwest to the United States.