Sonora were exploiting the indigenous. This rebellion destroyed the reputation of the Jesuit mission system. Another Seri rebellion occurred in 1748, with Pima and Tohono O’otham support and lasted into the 1750s. This kept the settlement situation in disarray. With population of the Mexican split half indigenous and half Spanish, about one-quarter of the indigenous population lived in Sonora alone. In 1767, the king of Spain expelled the Jesuits from Spanish-controlled territories, ending the mission system. In 1821, the colonial era in Sonora was ended by the Mexican War of Independence, which started in 1810. Without being directly involved in the
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,