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:
Treaty of Guadalupe Hidalgo
Mexico had claimed the area in question since winning its independence from the Spanish Empire in 1821 following the Mexican War of Independence. The Spanish Empire had conquered part of the area from the American Indian tribes over the preceding three centuries, but there remained powerful and independent indigenous nations within that northern region of Mexico. Most of that land was too dry (low rainfall) and too mountainous to support many people, until the advent of new technology after about 1880: means for damming and distributing water from the few rivers to irrigated farmland; the telegraph; the railroad; the telephone; and electrical power.