The former rector of the Colegio de San Nicolás Obispo (where Morelos attended seminary), Father Miguel Hidalgo y Costilla was planning with others for the independence of New Spain from the Spanish empire.
After taking all the important cities of the Bajío region and being proclaimed captain general of Mexico in Celaya on September 21, Hidalgo y Costilla advanced as far as Guanajuato.