Miguel Hidalgo y Costilla, was a Mexican priest and a member of a group of educated Criollos in Querétaro. They met in tertulias (salons) and decided in 1810 that a revolt against the colonial government was needed because Napoleon I had replaced the King of Spain with a French foreigner. Hidalgo worked closely with Ignacio de Allende, a nobleman with military training, for a battle in December 1810.
They were betrayed by a member of the group. Hidalgo turned to his parishioners in the town of Dolores. Around 6:00 a.m. on September 16, 1810, he declared independence from the Spanish crown and war against the government in what was known as the Grito de Dolores. The revolutionary army decided to fight for independence and marched on to Guanajuato, which was a major colonial mining center that was governed by Spaniards and criollos.
There, the leaders of the "Citizens' Army," which was poorly organized, locked themselves in the granary and killed most of the Spaniards and Criollos who were there. That included high-ranking nobles and supporters of the fight for independence, which caused Hidalgo and Allende to fight with each other.
Allende no longer wanted to fight alongside Hidalgo and left with his soldiers.
Hidalgo and what was left of his army were caught in the state of Coahuila at the Wells of Baján. He had a trial done by the Spanish Inquisition on 30 July 1811 and was executed.
A long war followed at the Siege of Cuautla. In 1815, Morelos was caught by Spanish colonial authorities. He was put on trial and executed for treason in San Cristóbal Ecatepec on 22 December.
Independence
By the early 1820s, the independence movement was close to collapsing. Two of its main leaders had been executed, and the rebels could not easily fight the well-organized Spanish military. Also, many of the most influential criollos did not care any more. The violence of the unorganized army of Hidalgo and Morelos was not liked. The Mexicans wanted a better and less bloody way to get their independence.
In December 1820, Viceroy Juan Ruiz de Apodaca sent a force led by a royalist criollo officer, Colonel Agustín de Iturbide, to fight in Oaxaca. Iturbide was famous for the way in which he went after the rebels during the early independence struggle.
The fight at Oaxaca came at the same time as successful military coup in Spain against the monarchy of Ferdinand VII. Ferdinand was forced to reinstate the liberal Spanish Constitution of 1812. When that news reached Mexico, Iturbide saw it as an opportunity for the criollos to gain control of Mexico. After clashing with Guerrero's forces, Iturbide switched sides. He invited the rebel leader to meet to discuss a new independence struggle.
In the town of Iguala, Iturbide created three rules, or "guarantees," for Mexican independence from Spain:
Mexico would be an independent kingdom that would be ruled by King Ferdinand, another Bourbon prince, or some other conservative European prince. A criollo ruler could be appointed by the Mexican Congress if no European would take the position.
Criollos and peninsulares would from now have equal rights and privileges.
The Roman Catholic Church would keep its privileges and be the only religion allowed.
He made his troops accept these rules, which are known as the Plan of Iguala. Iturbide then persuaded Guerrero to join his forces in support of the new independence. A new army, the Army of the Three Guarantees, was placed under Iturbide's command to enforce the plan. It was so broad that it pleased both patriots and loyalists. The goal of independence and the protection of Roman Catholicism brought together all factions.
Iturbide's army was joined by rebel forces from all over Mexico. When the rebels' victory became certain, the viceroy resigned. On August 24, 1821, representatives of the Spanish crown and Iturbide signed the Treaty of Córdoba, which recognized Mexican independence under the terms of the plan of Iguala.
On September 27, the Army of the Three Guarantees entered Mexico City. The next day, Iturbide proclaimed the independence of the Mexican Empire.
On the night of May 18, 1822, a mass of people marched through the streets. They demanded for Iturbide to accept the throne. The next day, the Congress declared Iturbide emperor of Mexico.