The Battle of Guanajuato, the first important fight in the war, happened 4 days later. Mexico's independence from Spain wouldn't be declared until September 27, 1821, after ten years of war. This happened with the declaration of the first Mexican Empire.