Four people died and three were injured in an explosion at a fireworks factory in the central Mexican town of Ejidos de Santa Maria y San Agustin, officials said.

The Public Safety Secretariat in the state of Mexico said in a communique that the number of dead and injured could change.

The agency said that a first explosion occurred at the factory on Thursday when workers were making fireworks, but later there was a second blast that encompassed the gunpowder storeroom and warehouse.

Authorities said that two people were killed at the scene of the accident, another succumbed when taken to hospital for treatment, while a third died Thursday night of the injuries suffered.

Another three people were badly burned.

"The causes of the explosions are still unknown and it will be up to the corresponding ministry authority to report on any progress made in the investigation into the incident," the communique said.

It added that this factory was officially registered with the Defense Secretariat. EFE