How did the disputes over the Texas-mexico border effect the mexican-American war

The disputes over the Texas-Mexico border were a major factor in the Mexican-American War. The border between the two countries had been in dispute since the 1820s, when Mexico won its independence from Spain. In 1836, Texas declared its independence from Mexico and claimed the Rio Grande as its southern border. Mexico, however, continued to claim the Nueces River as its border. This disagreement over the border led to a series of skirmishes between the two countries, culminating in the Mexican-American War in 1846. The war ended with the Treaty of Guadalupe Hidalgo in 1848, which established the Rio Grande as the official border between the two countries.