Answer:
Catholic priest Miguel Hidalgo (1753-1811) started the revolt that eventually became the War of Independence against Spain (1810-1821). He was however, captured and executed in 1811, one year after the start of the conflict.
When royalist general Agustin de Iturbide (1783-1824) switched alliegances and joined forces with insurgent general Vicente Guerrero (1782-1831) in 1821, the independence war was consumated. Both entered Mexico City on September 27, 1821 thus ending the war.
Spain didn't recognize Mexico's independence until December 28, 1836. By then, such recognition was almost irrelevant -- most colonies of Spain in the Americas were already independent and falling within the spheres of influence of either France, England or the United States.
Explanation: