Dozens of workers who were asleep when the fire broke out were trapped Sunday in the burning four-story building with little ventilation and only one exit.
Tucked in an alleyway tangled with electrical wires, firefighters had to fight the blaze from 100 meters (330 feet) away. Rescuers carried out survivors and the dead one by one.
The building, zoned for residential use, had been clandestinely and crudely converted into a cluster of small factories in a pattern repeated in old and crowded areas across the city of 28 million.
Tens of thousands of such spaces have been closed in a drive spurred by a decades-old court case, but a Delhi Municipal Corporation census counted more than 30,000 illegal factories last year.
Sunday's tragedy illustrates authorities' struggle to control the proliferation of illegal factories in ancient parts of the city that were long exempt from regulation, despite the Supreme Court order to close them or revamp the surrounding city infrastructure, including widening roads and installing water service, according to New Delhi's master plan.
Factories operating in areas zoned residential were ordered closed.
"What happened in Delhi was unfortunately they were completely illegalized, so what we have now is this mushrooming happening in completely underground ways, all over the city. They moved the entire sector to the underground," said Anuj Bhuwania, an associate law professor at Ambedkar University in New Delhi who has studied the public interest litigation cases that spurred the Supreme Court order.
More than 100 migrant workers earning as little as $2 a day making handbags, caps and other garments worked in the fire-gutted building's 500 square meters (about 5,400 square feet). The building was built about 15 years ago as a residential complex and later quietly turned into a commercial hub, according to Delhi Municipal Corporation officials.
The dense neighborhood is home to thousands of migrant workers from across India who often live and work in the same space.
Aslam, a local resident who goes by one name, said the building was among many that lack necessary clearances and fire safety equipment.
He said there was a small fire in the same building in March. There were no reported injuries and local residents put it out themselves, but it should have set off alarm bells, he said.
"The building was a disaster in the making. Almost every building in this neighborhood is unsafe," Aslam said.
Manufacturing in New Delhi has declined with a clampdown on illegal activity and the rise of the service sector. There were about 130,000 factory spaces in 2001, according to an official economy survey. With growing public concern about industrial pollution contributing to New Delhi's noxious air, authorities have shuttered tens of thousands of illegal factory operations since then.
The 30,000-plus illegal factories found by the municipal corporation census last year are nearly quadruple the number of factories registered with New Delhi's planning department in 2017.
Jai Prakash, a municipal administrator in New Delhi, said they are continuously trying to close illegal factories and small manufacturing units.
One complication is the shortage of affordable housing.
Many of these spaces also serve as sleeping quarters for poor laborers and their families who migrate from Indian villages and small towns for employment.
Another administrator, Varsha Joshi, said it is building owners who usually turn residential buildings into commercial hubs. Aslam said that often, each floor of a building is informally leased to a different commercial tenant who uses middlemen to find contract workers.
The owner of the building that caught fire on Sunday was detained on suspicion of culpable homicide not amounting to murder. He remains in custody but hasn't been formally charged while the investigation continues. Bhuwania said cracking down in this case would do little to keep small factories from operating within Delhi.
"Being so fundamentalist about zoning in this city makes no sense. This is not the reality of the city," he said. "This is a fantasy city that they want to build."