At least one person died and 40 were injured in an explosion at a candy factory in Mexico.

The blast inside the Dulces Blueberry factory in Ciudad Juarez triggered a fire that tore through the building and caused the roof to collapse.

"I was able to help five people who walked out of the building but as soon as they were out they went into shock and fainted," said factory worker Ismael Bouchet.

The explosion occurred on the second floor of the factory, which produces gummy bears, jelly beans, peach rings and other sweets. Authorities believe it was caused by a recently installed boiler.

"Since the morning, several co-workers said there was a bad smell, that it smelled of acid and because it was a new area we thought it was normal," Bouchet said.

Photos of the incident showed some of the workers sporting injuries that resembled chemical burns.

Some 300 people were believed to be in the building when the ceiling caved in.

Ciudad Juarez Civil Protection Director Fernando Mota said several people are still missing and might be trapped inside.

Eleven of the injured have been taken to hospital in a serious condition, authorities said.