With the imperial government taken by surprise, operatives took important cities of the Bajío region without an organized response. The insurgency proclaimed Hidalgo captain general of Mexico in Celaya on September 21. Hidalgo y Costilla advanced as far as Guanajuato; and on September 28, the rebels captured the Alhóndiga de Granaditas in battle, killing at least 500 Spaniards who had taken shelter there. Among the dead was the crown's highest official in Guanajuato, Intendant Juan Antonio Riaño, an old friend of Hidalgo y Costilla.