Mexican War of Independence
Iturbide's assignment to the Oaxaca expedition coincided with a successful military coup in Spain against the monarchy of Ferdinand VII. The coup leaders, part of an expeditionary force assembled to suppress the independence movements in the Americas, had turned against the monarchy. They compelled the reluctant Ferdinand to reinstate the liberal Spanish Constitution of 1812 that created a constitutional monarchy. When news of the liberal charter reached Mexico, Iturbide perceived it both as a threat to the status quo and a catalyst to rouse the criollos to gain control of Mexico. Independence was achieved when conservative Royalist forces in the colonies chose to rise up against the liberal regime in Spain; it was an about-face compared to their previous opposition to the peasant insurgency. After an initial clash with Guerrero's forces, Iturbide assumed command of the royal army. At Iguala, he allied his formerly royalist force with Guerrero’s radical insurgents to discuss the renewed struggle for independence.
First Mexican Republic
The Spanish overseas possession of the Viceroyalty of New Spain lasted for 300 years, from 1521 with the fall of the Aztec capital of Tenochtitlan and the foundation of Mexico City until the collapse of the viceroyalty in following years of civil war and military stalemate. An insurgency for independence from Spain lasted from the initial 1810 mass revolt, led by secular cleric Miguel Hidalgo and continued under another secular cleric, José María Morelos, and carried on the hot country of Mexico's south by Vicente Guerrero. Augustin Iturbide, a royalist military officer born in New Spain of Spanish parents, made a strategic alliance with Guerrero under the Plan of Iguala, in which the former foes fought in tandem to oust Spanish rule. The plan proclaimed Mexico a nation-state; Roman Catholicism as the sole religion; the equality of Spaniards and American-born Spaniards and abolished legal racial designations, and was to be a constitutional monarchy. On September 27, 1821, Mexico obtained its sovereignty under the Treaty of Córdoba, which recognized New Spain as an independent empire, which took the name the Mexican Empire.