The northern Spanish city of Burgos was holding the 9th International Fireworks Exhibition when the accident happened.
At around 11.40 pm on Monday, something caused the shell casing of one of the fireworks to blow up, leading it to spin out of control and then shoot itself at a bridge packed full of eager spectators.
Most of the people who were injured suffered second and third degree burns as a result.
Another person broke his leg and a dozen others suffered minor injuries when panic caused a human avalanche to form at the bridge.
The imminent fireworks display was suspended as a dozen ambulances arrived at the scene to rush the victims to hospital, local daily El Diario de Burgos reported.
Local police are currently investigating what could have caused the pyrotechnic device to explode.