Indigenous peoples of Mexico
When Mexico gained independence in 1821, the casta system was eliminated as a legal structure, but racial divides remained. 
White Mexican argued about what the solution was to the "Indian Problem", that is indigenous who continued to live in communities and were not integrated politically or socially as citizens of the new republic. The Mexican constitution of 1824 has several articles pertaining to indigenous peoples. The second article of the constitution of Mexico recognizes and enforces the right of indigenous peoples and communities to self-determination and therefore their autonomy to:
Mexican–American War
In 1834, General Antonio López de Santa Anna became the centralist dictator of Mexico, abandoning the federal system. He decided to quash the semi-independence of Texas, having succeeded in doing so in Coahuila (in 1824, Mexico had merged Texas and Coahuila into the enormous state of Coahuila y Tejas). Finally, Stephen F. Austin called Texians to arms, and they declared independence from Mexico in 1836. After Santa Anna defeated the Texians in the Battle of the Alamo, he was defeated by the Texian Army commanded by General Sam Houston and captured at the Battle of San Jacinto; he signed a treaty recognizing the independence of Texas.