In early 1821, Agustín de Iturbide, the leader of the Royalist forces, negotiated the Plan of Iguala with Vicente Guerrero. Under the plan, Mexico would be established as an independent constitutional monarchy, the privileged position of the Catholic Church would be maintained, and Mexicans of Spanish descent would be regarded as equals to pure Spaniards. Mexicans of mixed or pure Indian blood would have lesser rights.
Iturbide defeated the Royalist forces still opposed to independence, and the new Spanish viceroy, lacking money, provisions, and troops, was forced to accept Mexican independence. On August 24, 1821, O'Donojú signed the Treaty of Córdoba, thus ending New Spain's dependence on Old Spain.
In 1822, as no Bourbon monarch to rule Mexico had been found, Iturbide was proclaimed the emperor of Mexico. However, his empire was short-lived, and in 1823 republican leaders Santa Anna and Guadalupe Victoria deposed Iturbide and set up a republic with Guadalupe Victoria as its first president.
Political tensions between reform-minded Mexicans and colonial authorities led Agustín de Iturbide, a royal officer with a record of success against earlier rebels, to come to terms with the leading Mexican insurgent at the time, Vicente R. Guerrero. Together, on February 24, 1821, they proposed a blueprint for independence called the Plan de Iguala. The plan offered three guarantees— preservation of the Catholic Church's status, the independence of Mexico as a constitutional monarchy, and equality of Spaniards and criollos. Although viceregal authorities tried to resist, the plan met with widespread approval both in civilian and military quarters. By the end of July 1821, when Juan O'Donoju arrived to take over the reins of colonial government, the loyalists controlled only Mexico City and Veracruz. Recognizing that all was lost, O'Donoju met with Iturbide at the town of Córdoba, where on August 24, 1821, he signed a treaty granting Mexico independence.
The Treaty of Córdoba established Mexican independence from Spain at the conclusion of the Mexican War of Independence. It was signed on August 24, 1821 in Córdoba, Veracruz, Mexico. The signatories were the head of the Army of the Three Guarantees, Agustín de Iturbide, and acting on behalf of the Spanish government, Jefe Político Superior Juan O'Donojú. The treaty has seventeen articles, which developed the proposals of the Plan of Iguala. The Treaty of Córdoba is the first document in which Spanish and Mexican officials accept the liberty of what will become the First Mexican Empire, although it is not today recognized as the foundational moment, since these ideas are often attributed to the Grito de Dolores (September 15, 1810).