The Mexican War of Independence (1810–1821) was a war between the people of Mexico and the Spanish colonial government. It started on 16 September 1810 since Mexican-born Spaniards (criollo people), Mestizos and Amerindians wanted their independence from Spain.
The idea of Mexican independence went back to the years after the Spanish conquest of the Aztec Empire. Martín Cortés led a revolt against the Spanish government.
After the Conspiracy of the Machetes failed in 1799, the War of Independence really started with the Grito de Dolores in 1810. Spain was busy fighting for its independence against the invading First French Empire during the Peninsular War and most of Latin America revolted.