Conversation so far:
What racial categories were there in Colonial-era Mexico?
The Spanish legal system divided racial groups into two basic categories, the República de Españoles, and the República de Indios.
Who did the indigenous Mexican people gain independence from?
The insurgency against the Spanish Empire was a decade-long struggle ending in 1821.

Question: What was the casta system?
Self-contained rewrite: What was the casta system in Mexico?