JAKARTA, INDONESIA -- An explosion and raging fire at a firecracker factory near the Indonesian capital on Thursday killed at least 39 people and injured dozens, police said.

The fire began Thursday morning at the factory located in a warehouse complex in Tangerang, a city in Banten province on the western outskirts of Jakarta. A police report said the fire spread after an explosion and that the factory's roof had collapsed.

Tangerang police chief Hary Kurniawan said dozens of injured people were being treated at three hospitals.

The factory with more than 50 employees began operating less than two months ago, he said.