The Mexican War of Independence was in reality a series of revolts that grew out of the increasing political turmoil both in Spain and Mexico at the beginning of the nineteenth century. During the French revolutionary and Napoleonic wars Spain fought both as an ally and as an enemy of France and suffered frequent interruptions in its commerce with its American colonies. Burdened with mounting war debts and facing a deepening economic crisis, Spanish rulers settled on extracting increased colonial revenues to meet European obligations. A royal decree in 1804 ordered imperial officials to confiscate certain church assets and place them at the disposal of the crown. In Mexico, as the church called in loans and mortgages and credit from that source dried up, a financial crisis emerged that was aggravated by an economic downturn caused by disruptions in overseas trade and bad harvests. Growing disaffection in New Spain received considerable reinforcement when Napoleon invaded Spain in 1808 and forced Ferdinand VII to abdicate the Spanish throne in favor of his brother Joseph.
Rejection of the French usurper was unanimous throughout the Spanish empire, even if unanimity of action did not follow. Mexico's criollo elite, long eager for a greater role in local government, seized the opportunity to promote a provisional government (junta gubernativa) acting in the name of the legitimate king, Ferdinand VII. Peninsular Spaniards, who made up the majority of the upper hierarchy of the church and held most other top colonial posts, favored rule by the existing viceroy and audiencia. Neither group was interested in seeing the Indian and mestizo masses, which were considered unstable, get involved in the crisis of government. The viceroy, Jose de Iturrigaray, miscalculated the strength and solidarity of the criollos and sided with them, only to be unseated in a palace coup by the well-organized peninsulars. Having dispatched Iturrigaray for Spain and arrested influential creoles, the peninsulars named Pedro Garibay, an aged Spanish field marshal, viceroy.
While Mexico City entered an uneasy calm in 1809, other parts of the viceroyalty became increasingly agitated. Continued disruptions in manufacturing caused by changing overseas trade, along with poor crops in 1809, led to an economic slowdown and famine in 1810, particularly in the Bajío, the viceroyalty's leading mining center. It was in the area of Querétaro, an important agricultural center in the region, that a number of disgruntled criollos, hoping to wrest power from the peninsulars, determined to employ the Indian and mixed-blood peasantry in the effort. Among the conspirators was the parish priest of Dolores, a small agricultural town east of Guanajuato. It fell to Father Miguel Hidalgo y Costilla to begin the rebellion formally against bad government and Spaniards on the morning of September 16, 1810, from the steps of the parish church, after he received news that the conspiracy had been exposed.
The early progress of the revolt, particularly the looting of Guanajuato, which was accompanied by the killing of large numbers of peninsulars and criollos, led these groups to close ranks behind the viceregal government. The able leadership of the new viceroy, Francisco Javier Venegas, and Gen. Félix María Calleja (who subsequently succeeded Venegas as viceroy) soon had Hidalgo's Indian army in retreat. In January 1811 Calleja defeated Hidalgo outside Guadalajara, forcing the rebel leadership to flee northward, toward the United States. Hidalgo and the insurgent leadership hoped to find at least temporary refuge in the northeastern provinces, where rebellion had also broken out. In Nuevo Santander Royalist forces mutinied against the governor when ordered to march toward San Luis Potosí to fight the insurgents. Governor Manuel Antonio Cordero y Bustamante of Coahuila suffered the defection of his 700 troops in early January 1811, when confronted by a rebel army of between 7,000 and 8,000. Insurgents dispatched to take control of Nuevo León found local officials there more than willing to declare in favor of Hidalgo. In Texas, Governor Manuel Salcedo was unseated on January 22, 1811, by a rebellious former militia officer, Juan Bautista de las Casas, with support from the troops garrisoning San Antonio (see CASAS REVOLT).
As in the central parts of the viceroyalty, insurgent successes in the north proved short-lived. Under orders from Viceroy Venegas, Gen. Joaquín de Arredondo successfully invaded Nuevo Santander in February 1811. At the beginning of March, loyalists under the leadership of Juan Manuel Zambrano wrested power from Casas, and in Coahuila loyalists managed to recapture Monclova in mid-March. On March 21, 1811, a loyalist officer, Ignacio Elizondo, ambushed the insurgent leadership, Ignacio Allende, Father Hidalgo, and their chief lieutenants, at the Wells of Baján on the road to Monclova. With this action the northeastern provinces returned to Royalist control. Only in Texas, which in the summer of 1812 suffered an invasion from the United States under the leadership of José Bernardo Gutiérrez de Lara and Augustus Magee, was royal authority seriously threatened. In August of 1813, however, General Arredondo defeated the rebels at the battle of Medina and secured Texas for the Spanish crown.
After the capture and execution of Hidalgo and Allende, José María Morelos y Pavón assumed leadership of the independence struggle. Morelos, like Hidalgo a cleric, had a clearer vision of Mexico's future and employed superior organizational and political skills. Under Morelos a clear declaration of independence from Spain was made and a constitution drafted. Still, Morelos was unable to obtain criollo backing for the struggle and he had to rely on mestizo support. He lost his position of leadership to his rivals in the movement, however, and in November 1815, while defending the escape of the insurgent government from loyalist attack, he was captured and executed. Subsequently the struggle for independence broke down into a series of local revolts and guerrilla actions that did not seriously threaten royal authority in Mexico until 1820.
The final push for independence resulted from Mexican reaction to revolutionary events in Spain that undermined the last vestiges of Spanish authority in the colonies. In January 1820 an army that assembled in Cádiz for an attempt to reconquer Argentina mutinied and sparked rebellion among other army units throughout Spain. Joined in revolt by liberals, radicals, and anyone opposed to Ferdinand's absolutist rule of the previous six years, the rebellious military forced the king to restore the Constitution of 1812. Once seated, the constitutional Cortes proved unwilling to address American grievances or to extend equal standing to colonials within the new order. 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.