Mexican War of Independence

The Mexican War of Independence (1810-1821) was a war between the people of Mexico and the Spanish colonial government. It started on 16 September 1810 since Mexican-born Spaniards (criollo people), Mestizos and Amerindians wanted their independence from Spain.
The idea of Mexican independence went back to the years after the Spanish conquest of the Aztec Empire. Martin Cortes led a revolt against the Spanish government.
After the Conspiracy of the Machetes failed in 1799, the War of Independence really started with the Grito de Dolores in 1810. Spain was busy fighting for its independence against the invading First French Empire during the Peninsular War and most of Latin America revolted.
Beginning
Miguel Hidalgo y Costilla, was a Mexican priest and a member of a group of educated Criollos in Queretaro. 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.
On October 30, Hidalgo's army fought the Spanish resistance at the Battle of Monte de las Cruces and won.
In January 1811, Spanish forces fought the Battle of the Bridge of Calderon and won. That made the rebels flee towards the United States-Mexican border, where they hoped to escape, but they were caught by the Spanish Army.
Hidalgo and what was left of his army were caught in the state of Coahuila at the Wells of Bajan. He had a trial done by the Spanish Inquisition on 30 July 1811 and was executed.
After Hidalgo's death of Father Hidalgo, the leadership of the revolutionary army was taken over by Jose Maria Morelos. Under his leadership, the cities of Oaxaca and Acapulco were taken. In 1813, the Congress of Chilpancingo had its first meeting. On 6 November, the Congress signed the first official document of independence, known as the Solemn Act of the Declaration of Independence of Northern America.
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 Cristobal 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 Agustin 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 Cordoba, 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.