Chain explosions rocked a fireworks factory, killing 24 in the city of Tultepec, which is renowned for its mesmerizing and dangerous pyrotechnic shows. Among the deceased were first responders who rushed to the scene.

The blasts struck the factory, which has been operating without a license, at 9:40 am on Thursday. As firefighters, police officers and members of the civil protection service arrived at the scene, the initial blast triggered a chain reaction, resulting in at least three more explosions.

At least 24 people, including a minor, have been confirmed dead amid fears that the death toll can still rise. Forty-nine people have been taken to hospitals suffering from severe burns and other injuries. Some heavily injured patients were airlifted to medical facilities.

Of the 24 victims, 17 died on the spot and a further seven were pronounced dead at the hospital.

Este es el polvorín sin permiso de la ⁦@SEDENAmx⁩ en La Saucera en #Tultepec a donde se originó la tragedia que enluta al momento a 24 hogares. La cifra puede aumentar pic.twitter.com/8lPc4xPNwM — poloespejel (@poloespejel) July 6, 2018

Luis Felipe Puente, the head of Mexico's civil defense agency, has blamed the tragedy on the mishandling of gunpowder, saying that the blasts tore up the clandestine facility that lacked government authorization.

The heavy death toll was due to people being caught in secondary explosions after they rushed to help those who were injured in the first place, Puente told the Milenio news network.

Firefighters, policemen and civil emergency workers fell victim to the blasts.

Outgoing Mexican President Enrique Peña Nieto has extended his condolences to the relatives of the victims, wishing a swift recovery to those in hospital care.

It is estimated that some 30 percent of the city's population, which prides itself as being Mexico's pyrotechnics capital, depend on fireworks production to provide for themselves, with private workshops popping up uncontrollably.

#ÚltimaHora Explosión en la Saucera, #Tultepec, Estado de México, reportan varios heridos. En breve más información... pic.twitter.com/nq54839pfV — El Universal (@El_Universal_Mx) July 5, 2018

The authorities are struggling to regulate the sprawling industry, and explosions that often lead to lethal outcomes have become a regular occurrence.

The Thursday explosion is the second deadliest of its kind in Tultepec, which is located about 40 kilometers (25 miles) north of the capital, Mexico City. At least 42 people were killed and dozens were injured after explosions struck an open-air fireworks market in December 2016.

Since the beginning of the year, 38 people have died in fireworks explosions in Tultepec and some 64 have been injured. The numbers represent a dramatic increase in comparison to the past year, when only nine people died in pyrotechnics-related incidents and 12 were injured, according to Milenio.

Every year, the city holds a weeklong festival to honor St. John of God, who local fireworks makers revere as their patron saint. The festival features fireworks competitions among producers.

You can watch the full documentary on the joys and perils of living in Mexico's 'pyrotechnics capital' below.