In 1846, the United States and Mexico went to war over a border dispute in Texas (a former state of Mexico that, after being its own country for a time joined the US), and the United States won the war. The peace treaty the two countries signed gave what is now the American Southwest to the United States. While most of what was then Northern Mexico did not have a large amount of people living in it, New Mexico had population centers in Pueblo and Spanish towns, especially along the Rio Grande river and in the Sangre de Cristo mountains. The New Mexican citizens living there were allowed to stay if they agreed to become US Citizens; over 90% did.