A fire has swept through a market in Delhi, killing at least 43 people and prompting an outpouring of grief and anger.

Witnesses said the fire took hold so quickly in the early hours of Sunday that there was little time for 50 labourers sleeping on the third floor of a factory building to escape. It took three hours to extinguish the blaze, and by Sunday afternoon, the extent of the damage was clear.

Most of the dead are thought to be migrant labourers from Bihar state, with the youngest victim believed to be 13. A further 50 people were injured, some of whom are in a critical condition.

Police said the building had violated multiple regulations and the owner had been arrested. Many of those who gathered near the site of the fire at Sadar Bazaar blamed the city council for poor oversight and regulation, as it is thought the factory was operating illegally. According to the head of the city’s fire services, Atul Garg, the building did not have fire clearance.

Sanjay Singh, a local MP, said it was the responsibility of municipal authorities to shut the factory down if it was operating illegally. “How did MCD [the council] allow the factory to run?” he asked.

Sanjay Jha, a minister in the Bihar state government, said: “This was bound to happen, you go and see the situation inside, there are live wires … It is a complete failure of the power department.”

While fires are common in India, the blaze is one of the deadliest in Delhi for years. It is thought the fire started due to an electrical fault in the workshop of the factory.

Sunil Choudhary, a deputy chief fire officer, said the factory had swiftly become a “toxic chamber”, owing to smoke filling the 600 sq ft (56 sq metre) space.

Fire officials described difficulty accessing the building, which was down a narrow alley. “We had to break the main gate to gain access to the building and bring out the people,” one said. “There was only one staircase to climb up the building. There was smoke and toxic gas all around and fire personnel faced much difficulty in fighting out the blaze.”

According to witnesses, people inside had attempted to scale the sides of the six-storey building trying to escape, while others tried to break through the sealed windows. Later, dozens of body bags were seen being carried from the wreckage of the building. Sobbing families waited outside one of the city’s hospital mortuaries to collect their relatives’ bodies.

Police said most of the victims were sleeping when the fire broke out and died from asphyxiation. Doctors at Lok Nayak hospital said at least 34 had died from smoke inhalation.

There was confusion in the aftermath, with people rushing to nearby hospitals to try to find their missing relatives. Among them was Mohammad Moti, who was searching for his 22-year-old nephew, Mohammad Chedi.

“I was told by someone my nephew is inside, but I haven’t seen him,” Moti said.

Visiting the site of the fire, Delhi’s chief minister, Arvind Kejriwal, said: “I have ordered a magisterial inquiry into it. Compensation of Rs 10 lakh [£10,870] each will be given to families of those dead and Rs 1 lakh to each of those injured. The expense of medical treatment of those injured will be borne by the government.”

India’s prime minister, Narendra Modi, described the blaze as “extremely horrific” and added: “My thoughts are with those who lost their loved ones. Wishing the injured a quick recovery. Authorities are providing all possible assistance at the site of the tragedy.”

Building laws and safety norms are often flouted by builders and occupants in India. In 1997, a fire at a cinema in Delhi killed 59 people. In February this year, 17 people were killed by a fire in a six-storey hotel in the city that started in an illegal rooftop kitchen.