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
The reinstatement of the liberal Constitution of Cadiz in 1820 caused a change of mind among the elite groups who had supported Spanish rule. Monarchist Creoles affected by the constitution decided to support the independence of New Spain; they sought an alliance with the former insurgent resistance. Agustín de Iturbide led the military arm of the conspirators and in early 1821 he met Vicente Guerrero. Both proclaimed the Plan of Iguala, which called for the union of all insurgent factions and was supported by both the aristocracy and clergy of New Spain. It called for a monarchy in an independent Mexico. Finally, the independence of Mexico was achieved on September 27, 1821.