MEXICO CITY — Twenty-four people, including a child, were killed and at least 49 others were injured Thursday when two explosions ripped through fireworks workshops in a town just north of Mexico City.

The dead included four firefighters and two police officers who rushed to the scene after the first explosion, only to be killed by the second blast.

The government of the State of Mexico said in an initial statement that eight people from the town of Tultepec were killed, along with the six emergency personnel and two others who hadn't yet been identified. The state government later raised the death toll to 24.

The government said first responders were also among the injured. Helicopters took the wounded to several hospitals, and more than 300 police were sent to the scene.

Many residents in the town make a living by fabricating and selling homemade fireworks, and explosions are a regular occurrence. In June, seven people were killed and eight others were injured in a blast in Tultepec.

In December 2016, a massive fire at an open-air fireworks market crowded with holiday shoppers killed several dozen people.

Deadly fireworks explosions have also occurred elsewhere in Mexico. In 2002, a blast at a market in the Gulf coast city of Veracruz killed 29 people; in 1999, 63 people died when an explosion of illegally stored fireworks destroyed part of the city of Celaya; in 1988, a fireworks blast in Mexico City's La Merced market killed at least 68 people; and in 2013, a rocket struck a truck loaded with fireworks for a religious procession in Tlaxcala state, killing 17 people.

Safety measures at fireworks workshops and markets have been a matter of constant debate in Mexico. While regulations exist on the books, many continue making powerful firecrackers and bottle rockets and sell them to the public.