At least 24 people killed and 40 others injured in a series of explosions at a fireworks depot in north of Mexico.

Twenty-four people were killed and at least 49 injured Thursday when a series of explosions ripped through fireworks workshops in a town just north of Mexico City, according to officials.

A market in the town has twice been badly damaged by explosions. More than 40 people died in blasts there in 2016.

The dead included at least four firefighters and two police officers who rushed to the scene after the first explosion, only to be killed by a subsequent wave of blasts.

The government of Mexico state said in a statement: "Emergency crews attended the call of the first explosion, when a second incident occurred, killing and injuring members of these groups."

At least four workshops were destroyed, local media said.

A fire triggered by the blasts was said to have been brought under control.