SOUTH AFRICA, Johannesburg – An inquiry opened on Thursday tasked with determining responsibility for a fire in Johannesburg that killed 77 people, exposing the living conditions of the victims and throwing a spotlight on gangs that seize abandoned buildings and rent them out.

One of the worst disasters in living memory in South Africa’s economic hub, the blaze broke out on Aug. 31 in a dilapidated building crammed with mostly foreign migrants. Many of the victims were burned beyond recognition.

Lucas Thipe, a platoon commander with the City of Johannesburg fire service, recounted his experience to the inquiry.

The fire appeared “abnormal”, the flames violent and escaping through the windows, forcing emergency services to start fighting the fire from outside the building.

“Whilst we were busy trying to gain entry, a lady came to me, she was screaming… she wanted to go through into the building, she had a baby inside,” Thipe said.

“So I called the team, I sent them through with a fire attack line… on the stairs as they entered they saw a heap of bodies, about four bodies that they saw.”

Residents said at the time of the disaster that the building had been taken over by criminal syndicates who charge fees to occupants, exploiting them but also offering more affordable housing to those who might otherwise be left homeless.

“When a building has been hijacked it becomes a fire time bomb,” Acting Chief of Emergency Management Services for the City of Johannesburg Rapulane Monageng told the inquiry.

He listed a litany of fire hazards identified so far: blocked emergency escape routes, stair wells converted into makeshift rooms and wood brought in from outside to partition rooms to create makeshift wooden shacks on the ground floor, where some 200 people were crammed together, he said.

A lack of fire extinguishers and the diverting of water from fire suppression equipment for domestic use were also evident.

Residents of such buildings rely on illegal electricity connections, gas burners and – when the country’s rolling power blackouts hit – candles, all of which increase the risk of fires.

Johannesburg is one of the world’s most unequal cities with widespread poverty, joblessness and a longstanding housing crisis. It has about 15,000 homeless people, according to the government of Gauteng, the province that includes the city.

Johannesburg city authorities had leased the gutted building to a charity providing shelter for women in 2016. But the charity ran out of money and stopped operating, residents said.