- The French Invasion: In 1808, Napoleon Bonaparte invaded Spain and replaced King Ferdinand VII with his brother, Joseph Bonaparte. This sparked outrage among the Spanish people and led to the formation of resistance groups known as juntas. These juntas declared loyalty to Ferdinand and fought against the French occupation.
- The Independence Movement: The juntas in Spain inspired similar movements in the Spanish colonies, including Mexico. In September 1810, a priest named Miguel Hidalgo y Costilla issued the "Grito de Dolores" (Cry of Dolores), which called for an armed rebellion against Spanish rule. Hidalgo's rebellion was initially successful, but he was eventually defeated by the Spanish army.
- The Leadership of Jose Maria Morelos: After Hidalgo's defeat, Jose Maria Morelos took up the cause of Mexican independence. Morelos was a brilliant strategist and military leader, and he won a series of victories against the Spanish. In 1813, Morelos convened a congress in Chilpancingo and issued a declaration of independence.
- The Spanish Cortes: In 1812, the Spanish Cortes (parliament) passed a constitution that promised representation for the Spanish colonies. However, the constitution was rejected by the Mexican rebels, who wanted complete independence from Spain.
- The Guerrero Revolt: In 1814, a new rebellion led by Vicente Guerrero broke out in Mexico. Guerrero's forces continued to fight the Spanish for several years, and they were eventually joined by other rebel leaders, including Augustin de Iturbide.
- The Plan of Iguala: In 1821, Iturbide and Guerrero issued the Plan of Iguala, which called for an independent Mexico under the rule of a constitutional monarchy. The plan was supported by many Mexicans, and it led to the collapse of Spanish rule in Mexico. On September 27, 1821, Mexico declared its independence from Spain.