The Mexican War of Independence (Spanish: Guerra de Independencia de México) was an armed conflict, and the culmination of a political and social process which ended the rule of Spain in 1821 in the territory of New Spain. The war had its antecedent in Napoleon’s French invasion of Spain in 1808; it extended from the Cry of Dolores by Father Miguel Hidalgo y Costilla on September 16, 1810, to the entrance of the Army of the Three Guarantees led by Agustín de Iturbide to Mexico City on September 27, 1821. September 16 is celebrated as Mexican Independence Day.
The movement for independence was inspired by the Age of Enlightenment and the American and French Revolutions. By that time the educated elite of New Spain had begun to reflect on the relations between Spain and its colonial kingdoms. Changes in the social and political structure occasioned by Bourbon Reforms and a deep economic crisis in New Spain caused discomfort among the native-born Creole elite.
The dramatic political events in Europe, the French Revolutionary Wars and the conquests of Napoleon deeply influenced events in New Spain. In 1808, Charles IV and Ferdinand VII were forced to abdicate in favor of the French Emperor, who then made his elder brother Joseph king. The same year, the ayuntamiento (city council) of Mexico City, supported by viceroy José de Iturrigaray, claimed sovereignty in the absence of the legitimate king. That led to a coup against the viceroy; when it was suppressed, the leaders of the movement were jailed.
Despite the defeat in Mexico City, small groups of rebels met in other cities of New Spain to raise movements against colonial rule. In 1810, after being discovered, Querétaro conspirators chose to take up arms on September 16 in the company of peasants and indigenous inhabitants of Dolores (Guanajuato), who were called to action by the secular Catholic priest Miguel Hidalgo, former rector of the Colegio de San Nicolás Obispo.
After 1810 the independence movement went through several stages, as leaders were imprisoned or executed by forces loyal to Spain. At first the rebels disputed the legitimacy of the French-installed Joseph Bonapartewhile recognizing the sovereignty of Ferdinand VII over Spain and its colonies, but later the leaders took more radical positions, rejecting the Spanish claim and espousing a new social order including the abolition of slavery. Secular priest José María Morelos called the separatist provinces to form the Congress of Chilpancingo, which gave the insurgency its own legal framework. After the defeat of Morelos, the movement survived as a guerrilla war under the leadership of Vicente Guerrero. By 1820, the few rebel groups survived most notably in the Sierra Madre del Sur and Veracruz.
The reinstatement of the liberal Constitution of Cadiz in 1820 caused a change of mind among the elite groups who had supported Spanish rule. Monarchist Creoles affected by the constitution decided to support the independence of New Spain; they sought an alliance with the former insurgent resistance. Agustín de Iturbide led the military arm of the conspirators and in early 1821 he met Vicente Guerrero. Both proclaimed the Plan of Iguala, which called for the union of all insurgent factions and was supported by both the aristocracy and clergy of New Spain. It called for a monarchy in an independent Mexico. Finally, the independence of Mexico was achieved on September 27, 1821.
After that, the mainland of New Spain was organized as the Mexican Empire. This ephemeral Catholic monarchy changed to a federal republic in 1823, due to internal conflicts and the separation of Central Americafrom Mexico.