<human>:  What was the name of the war that ended in 1846?
<bot>: The war that ended in 1846 was the Mexican-American War. It was fought between the United States and Mexico over the territory of Texas. The war ended with the Treaty of Guadalupe Hidalgo, which established the border between the two countries.