Mexicans of European descent officially in force through the rest of the colonial period. Criollo resentment of the privileges afforded to the "Peninsulares" was the main reason behind the Mexican War of Independence. When the war ended in 1821, the new Mexican government expelled the peninsulares (approximately 10,000 – 20,000 people) in the 1820s and 1830s which at a degree, kept the European ethnicity from growing as a percentage; this expulsion however, did not lead to any permanent ban on European immigrants, even from Spain. Independence did not do away with economic and social privilege based on race as the Criollos took over those
Latin American wars of independence movement against their colonial master, finally ended as a full-fledged civil war. Traditionally, the process is divided into three stages: Patria Vieja, Reconquista, and Patria Nueva. The first uprising against Spanish rule took place in 1809, and criollos in Ecuador set up a junta on September 22, 1810 to rule in the name of the Bourbon monarch; but as elsewhere, it allowed assertion of their own power. Only in 1822 did Ecuador fully gain independence and became part of Gran Colombia, from which it withdrew in 1830. At the Battle of Pichincha, near present-day Quito, Ecuador on May 24, 1822,