MEXICO CITY -- Nineteen people were killed and at least 31 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.

Video shot from a nearby highway showed a massive plume of smoke rising up from the area of the explosion in the town of Tultepec. Other images released by local media showed wrecked buildings and scorched ground in a rural patch of modest homes and small farm plots.

The government of the State of Mexico said in a statement that eight people from Tultepec were killed, along with the six emergency personnel and two others who have not yet been identified. The state civil defense office later raised the death toll to 19, but did not specify who the other victims were in a statement posted to its Twitter account.

Get Breaking News Delivered to Your Inbox

The government said first responders were also among the injured. Helicopters took the wounded to several local hospitals, and more than 300 police were dispatched 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 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; 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; 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.