When anything combustible is aerosolized and mixed with oxygen, it allows it to explode. This is how thermobaric explosives work https://en.wikipedia.org/wiki/Thermobaric_weapon see also https://en.wikipedia.org/wiki/Dust_explosion
Gunpowder doesn't need oxygen, but it burns instead of exploding. If there was an initial set of fires and smaller explosions that dispersed unburned gunpowder and wood/grain dust into the sky, once it was dispersed a flash could have spread through the dust cloud and created a huge explosion as described. This theory would explain both the initial disturbances and the huge explosion at the end, but I don't see it mentioned anywhere.