Introduction
Armed conflict which ended Spanish rule of New Spain Not to be confused with the Mexican Revolution in the early 20th century. Mexican War of IndependencePart of the Spanish American wars of independenceClockwise from top left: Miguel Hidalgo, José María Morelos, Trigarante Army in Mexico City, Mural of independence by O'Gorman, Embrace of Acatempan between Iturbide and GuerreroDate16 September 1810 – 27 September 1821(11 years, 1 week and 4 days)Location MexicoResult Mexican victory and Independence agreement Treaty of Córdoba First Mexican Empire is established Signing of the Declaration of Independence of the Mexican Empire Spain would not recognize Mexican independence until signing of Santa María–Calatrava Treaty in 1836Territorialchanges Spain loses the continental area of Viceroyalty of New Spain with the exception of San Juan de Ulúa, VeracruzBelligerents Insurgents Army of the Three Guarantees Spanish Empire Viceroyalty of New SpainCommanders and leaders Miguel Hidalgo  Ignacio Allende  Ignacio López Rayon (POW) José María Morelos  Vicente Guerrero Mariano Matamoros  Guadalupe Victoria Francisco XavierMina  Agustín de Iturbide Antonio López de Santa Anna Ferdinand VII Francisco Venegas (1810–13) Félix María Calleja (1810–16) Juan Ruiz de Apodaca (1816–21) Francisco Novella (1821) Juan O'Donojú (1821)Strength 80,000 (1811) 7,000 (1811)Spain: 9,685 (1810–1821)Casualties and losses 250,000 to 600,000 total deaths vteMexican War of Independence First Stage (1810–1811) Alhóndiga de Granaditas Puerto de Carroza Valladolid Monte de las Cruces Zacoalco Aculco Guadalajara Acaponeta Tepic San Blas Guanajuato Real del Rosario Tres Palos Aguanueva Urepetiro Calderón Bridge Puerto del Carnero San Ignacio de Piaxtla vteMexican War of Independence Organizational phase (1811–1815) Puerto de Piñones Zacatecas El Veladero El Maguey Llanos de Santa Juana Huauchinango Zitácuaro Tecualoya Tenancingo Cuautla Izúcar Huajuapan de León Tenango del Valle Escamela Zitlala Texas Nacogdoches Rosillo Creek Alazan Creek Medina San Antonio Orizaba Oaxaca Acapulco La Chincúa Lomas de Santa María Puruarán Temalaca vteMexican War of Independence Resistance and Consummation Phases (1815–1821) Cañada de Los Naranjos Mina campaign Valle de Maíz Soto la Marina Peotillos Los Arrastraderos Fuerte del Sombrero Cerro de Cóporo San Diego de la Unión El Tamo Cerro de Barrabás Agua Zarca Zapotepec Córdoba Veracruz Azcapotzalco vteSpanish colonial campaigns 15th century Canary Islands (1402–96) Santa Cruz de la Mar Pequeña (1478) Guinea (1478) Algeria (1497) Melilla (1497) 16th century Algeria (1505) Algeria (1507) Morocco (1508) Algeria (1509) Algeria (1510) Tripoli (1510) Tunisia (1510) Puerto Rico (1511–29) Algeria (1516) Algeria (1517–18) Mexico (1519–1821) Mexico (1519–21) Algeria (1519) Tunisia (1520) Chiapas (1523–1695) Guatemala (1524–1697) Nicaragua (1524–27) El Salvador (1524–39) Honduras (1524–39) Morocco (1525) Colombia (1525–40) Yucatán (1527–1697) Algeria (1529) Algeria (1531) Peru (1532–72) Tunisia (1534) Brazil (1534–36) Algeria (1535) Tunisia (1535) Colombia (1537–40) Algeria (1541) 1st Algeria (1543) 2nd Algeria (1543) Halmahera (1545) Chile (1546–1662) Algeria (1547) Tunisia (1550) Libya (1551) Algeria (1555) Algeria (1556) Algeria (1558) Tunisia (1560) Argentine Northwest (1560–1667) Algeria (1563) Morocco (1563) Morocco (1564) Morocco (1565) Philippines (1565–1898) Florida (1565) Philippines (1567–72) Tunisia (1573) Tunisia (1574) Manila (1574) Brunei (1578) Cagayan (1582) Insulindia (1582) Insulindia (1585) Cambodia (1593–97) Puerto Rico (1595) Philippines (1596) Cuba (1596) Puerto Rico (1598) Philippines (1599–1600) 17th century Philippines (1602) Insulindia (1603) Tunisia (1605) Moluccas (1606) Tunisia (1609) Tunisia (1611) Tunisia (1612) Tunisia (1615) Tunisia (1617) Morocco (1614) Petén (1618–97) Brazil (1625) Taiwan (1626) Morocco (1628) St. Kitts · Nevis (1629) Philippines (1630) Brazil (1631) Brazil (1638) Philippines (1638–46) Brazil (1640) Colombia (1641) Taiwan (1641) Taiwan (1642) Chiloé · Valdivia (1643) Philippines (1646) Tortuga (1654) Hispaniola (1655) Jamaica (1655) Jamaica (1657) Jamaica (1658) Porto Bello (1668) Lake Maracaibo (1669) Panama (1671) New Mexico (1680–92) Morocco (1689) 18th century North America (1702–13) Chiloé (1712) Bahamas (1720) Chile (1723–1726) Oran (1732) Banda Oriental (1735–37) Caribbean and North America (1739–48) Peru (1742–52) Iberian Peninsula and South America (1762–63) Portugal (1762) Banda Oriental and Rio Grande do Sul (1762–63) Cuba (1762) Nicaragua (1762) Philippines (1762) Chile (1766–1767) Algiers (1775) Banda Oriental (1776–1777) North America (1779–83) Peru (1780–82) New Granada (1781) Algiers (1783) Algiers (1784) Chile (1792) Caribbean (1796–1802) 19th century Río de la Plata (1806–07) Spanish America (1808–33) Bolivia (1809–25) Argentina (1810–18) Florida (1810) Paraguay (1810–11) Mexico (1810–21) Peru (1811–24) El Salvador (1811) Uruguay (1811) Venezuela (1811–23) Chile (1812–27) Colombia (1815–16) Colombia (1819–20) Ecuador (1820–22) Mexico (1821–29) Balanguingui (1848) Cochinchina (1858–62) Morocco (1859–1860) Dominican Republic (1863–65) Peru and Chile (1864–66) Puerto Rico (1868) Cuba (1868–78) Cuba (1879–80) Morocco (1893–94) Cuba (1895–98) Philippines (1896–98) Puerto Rico (1897) Puerto Rico (1898) Guam (1898) 20th century Morocco (1909) Morocco (1911–12) Morocco (1920–26) Morocco (1957–58) Western Sahara (1973–76) Western Sahara (1975) The Mexican War of Independence (Spanish: Guerra de Independencia de México, 16 September 1810 – 27 September 1821) was an armed conflict and political process resulting in Mexico's independence from the Spanish Empire. It was not a single, coherent event, but local and regional struggles that occurred within the same period, and can be considered a revolutionary civil war. It culminated with the drafting of the Declaration of Independence of the Mexican Empire in Mexico City on September 28, 1821, following the collapse of royal government and the military triumph of forces for independence. Mexican independence from Spain was not an inevitable outcome of the relationship between the Spanish Empire and its most valuable overseas possession, but events in Spain had a direct impact on the outbreak of the armed insurgency in 1810 and the course of warfare through the end of the conflict. Napoleon Bonaparte's invasion of Spain in 1808 touched off a crisis of legitimacy of crown rule, since he had placed his brother Joseph on the Spanish throne after forcing the abdication of the Spanish monarch Charles IV. In Spain and many of its overseas possessions, the local response was to set up juntas, ruling in the name of the Bourbon monarchy. Delegates in Spain and overseas territories met in Cádiz—a small corner of the Iberian Peninsula still under Spanish control—as the Cortes of Cádiz, and drafted the Spanish Constitution of 1812. That constitution sought to create a new governing framework in the absence of the legitimate Spanish monarch. It tried to accommodate the aspirations of American-born Spaniards (criollos) for more local control and equal standing with Peninsular-born Spaniards, known locally as peninsulares. This political process had far-reaching impacts in New Spain during the independence war and beyond. Pre-existing cultural, religious, and racial divides in Mexico played a major role in not only the development of the independence movement but also the development of the conflict as it progressed. The conflict had several phases. The first uprising for independence was led by parish priest Miguel Hidalgo y Costilla, who issued the Cry of Dolores on 16 September 1810. The revolt was massive and not well organized. Hidalgo was captured by royalist forces, defrocked from the priesthood, and executed in July 1811. The second phase of the insurgency was led by Father José María Morelos, who was captured by royalist forces and executed in 1815. The insurgency devolved into guerrilla warfare, with Vicente Guerrero emerging as a leader. Neither royalists nor insurgents gained the upper hand, with military stalemate continuing until 1821, when former royalist commander Agustín de Iturbide made an alliance with Guerrero under the Plan of Iguala in 1821. They formed a unified military force rapidly bringing about the collapse of royal government and the establishment of independent Mexico. The unexpected turn of events in Mexico was prompted by events in Spain. When Spanish liberals overthrew the autocratic rule of Ferdinand VII in 1820, conservatives in New Spain saw political independence as a way to maintain their position. The unified military force entered Mexico City in triumph in September 1821 and the Spanish viceroy Juan O'Donojú signed the Treaty of Córdoba, ending Spanish rule. Indigenous resistance in Mexico predates the War of Independence, including the 1761 Peasant Revolt in Puebla in response to colonial policies. Though suppressed, these movements sustained opposition traditions. Besides, Afro-Mexicans like Vicente Guerrero and José María Morelos also played crucial roles in Mexico's independence movement in the early 19th century. Following independence, the mainland of New Spain was organized as the First Mexican Empire, led by Agustín de Iturbide. This ephemeral constitutional monarchy was overthrown and a federal republic was declared in 1823 and codified in the Constitution of 1824. After some Spanish reconquest attempts, including the expedition of Isidro Barradas in 1829, Spain under the rule of Isabella II recognized the independence of Mexico in 1836.