Mexico gained independence from Spain on Sept. 27, 1821. On Sept. 16, 1810, Miguel Hidalgo y Costilla declared independence from Spain by issuing the "Grito de Dolores" and launched the Mexican War of Independence. The war ended with the signing of the Treaty of Cordoba on Aug. 24, 1821.
Catholic priest Hidalgo's "Grito de Dolores," or "Cry of Delores," of 1810 called for racial equality, the redistribution of land and an end to Spanish rule. Hidalgo achieved some successes but was eventually captured and executed. Other leaders, such as Mariao Matamoros and Vincente Guerro, took his place and continued the revolt against the Spanish and Royalists. Mexico became an independent constitutional monarchy in 1821 and a republic with Guadalupe Victoria as president in 1823.