The Adams-Onís Treaty (1819) established a portion of the United States~ez_rsquo~ western boundary at the Sabine River, which separated the young republic from Spanish-held Mexico.
In the succeeding years, Mexico achieved its independence from Spain and its northern regions became the destination of a large number of migrants from the United States. The lands of present-day eastern Texas were prime cotton territory and for some years the Mexican government welcomed the development of its most distant province, Tejas, meaning friend or ally in Spanish. As the number of foreigners increased, the Mexican government grew leery. These tensions culminated in the Texan Revolution of 1835-36.
Texan independence ushered in the short-lived Republic of Texas, known popularly as the Lone Star Republic. In the years between 1836 and 1848, independent Texas claimed that its western boundary was defined by the Rio Grande. The Mexican government disagreed, arguing that Texas was confined to a line beginning at the Nueces River.
The boundary matter would continue to be contested until the end of the Mexican War in 1848.