Independent Texas shown by Texan Flag, Mexican territory claimed by Texas shown in Velvet Red.
Before Texas was a Republic it was a Mexican Territory, with a population of just 4000 Tejano's. By 1824 The Mexican Government desperate to populate the region invited Americans to settle the region, under the requirement and assumption that the settlers would: a) learn the Spanish Language, b) convert to Roman Catholicism, and c) be loyal to the Mexican Government. By 1832 the number of American settlers topped 30,000, very few of the settlers obeyed any of the three compromises, and most had also brought slavery into Texas, which was against Mexican Law. When the government began to enforce the ban on slavery, desire for secession reached its peak, eventually leading to the Texas Revolution, and defacto Texan Independence.
Continuation of conflict after Texan Independence
Just because General Santa Anna surrendered to the Texans did not end disputes, Texas claimed large portions of New Mexico they never occupied, and Mexico never gave up attempts to take back land from Texas.
Mexico never entirely recognized Texas' independence, instead the Mexican Government considered Texas a rebellious territory still belonging to The Mexican Federation. By 1838 Texas had a firm hold on its eastern lands, but the majority of Texas remained under Mexican control. Texas claimed the official southern and western border between the two countries to be the Rio Grande, Mexico considered it a ridiculous compromise to even allow the eastern part of Texas to remain independent.