The ordeal ended in a chaotic outburst of gunfire and explosions that killed more than 330 people , about half of them children .