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 War of Independence
After 1810 the independence movement went through several stages, as leaders were imprisoned or executed by forces loyal to Spain. At first the rebels disputed the legitimacy of the French-installed Joseph Bonaparte while recognizing the sovereignty of Ferdinand VII over Spain and its colonies, but later the leaders took more radical positions, rejecting the Spanish claim and espousing a new social order including the abolition of slavery. Secular priest José María Morelos called the separatist provinces to form the Congress of Chilpancingo, which gave the insurgency its own legal framework. After the defeat of Morelos, the movement survived as a guerrilla war under the leadership of Vicente Guerrero. By 1820, the few rebel groups survived most notably in the Sierra Madre del Sur and Veracruz.