NEW DELHI — A fire at an industrial building on the outskirts of New Delhi broke out as workers were stuffing gunpowder into firecrackers, trapping many of them on the factory’s upper floors as it spread, and leaving at least 17 dead.

The laborers were paid only a few dollars a day to work in harsh conditions, and at least 10 of those who died on Saturday were women, two of whom were reportedly found tightly embracing each other.

Frequent fires are a tragic reality in India’s urban areas: A blaze at two upscale restaurants in Mumbai killed 14 people last month, and factories in the New Delhi area, including ones manufacturing shoes and plastics, catch fire with some regularity.

An official with the Delhi Fire Service said the building that went up in flames over the weekend in Bawana, an industrial area outside New Delhi, had no clear fire-safety arrangements, and the Indian news media reported that the businessman who had rented the factory had been taken into custody.