Just when it looked as though the outnumbered Spaniards would hold out, a young miner named Juan José de los Reyes Martínez (aka El Pípila), under orders from Hidalgo, tied a stone slab to his back and, protected from Spanish bullets, set the gates ablaze. The Spaniards choked on smoke and the rebels moved in to take the Alhóndiga, killing most of those inside. El Pípila probably perished in the battle, but some versions of the story have it that he lived to a ripe old age.
From 1864 the Alhóndiga was used as a prison for a century, before becoming a museum in 1967. There's also a fine art gallery. Don't miss Chávez Morado's dramatic murals of Guanajuato's history on the staircases.
Read more: http://www.lonelyplanet.com/mexico/northern-central-highlands/guanajuato/sights/museum/alhondiga-de-granaditas#ixzz1n7mYA4qp