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.
History of Mexico
By 1823, Mexicans of all classes were fed up with emperor Agustin de Iturbide's corrupt and oppressive rule. They overthrew him and 4 October 1824, the United Mexican States (Spanish: Estados Unidos Mexicanos) was established. The new constitution was partly modeled on the constitution of the United States. It guaranteed basic human rights and defined Mexico as a representative federal republic, in which responsibilities of government were divided between a central government and a number of smaller units called states. It also defined Catholicism as the official and unique religion. The Federal Republic of Central America was allowed to re-establish its independence, which it had declared on 1 July 1823.