Allen Bantolo, the local police chief ruled out sabotage as the cause of the explosion.

About 20 people were working on the late shift in the factory at the time of the blast.

"Four night shift workers at the factory were killed on the spot due to the explosion," Bantolo said, adding eight more died while undergoing treatment in nearby hospitals.

Bartolome Ramos, Santa Maria's mayor, told Philippine media the factory had been operating for more than 20 years, and had passed a review for the renewal of its safety license last January.

He said the local government's safety teams had been conducting regular inspections to ensure safety regulations were being followed.