JOHANNESBURG -- A nighttime fire ripped through a rundown apartment building mainly occupied by homeless people and squatters in Johannesburg early Thursday, leaving at least 74 dead, officials said. Some people threw babies out of third-storey windows to others waiting below in the desperate scramble to evacuate, witnesses said.

At least 12 of those killed were children, the youngest a 1-year-old, according to city and medical officials. They said at a news conference that an undetermined number of people were still missing and many bodies recovered were burned beyond recognition.

More than 50 people were injured, six of whom were in a serious condition in the hospital. Emergency services officials had earlier warned that the death toll could rise as they continued to search the scene more than 12 hours after the blaze broke out at around 1 a.m.

Dozens of bodies recovered by firefighters were laid out on a side road outside the apartment block, some in body bags, others covered in silver sheets or blankets after the body bags ran out. They were eventually taken away in pathology department vehicles.

"Over 20 years in the service, I've never come across something like this," Johannesburg Emergency Services Management spokesperson Robert Mulaudzi said.

Authorities hadn't established the cause of the fire but Mgcini Tshwaku, a local government official, said initial evidence suggested it started with a candle. Inhabitants used candles and fires for light and to keep warm in the winter cold, he said.

Firefighters were still making their way through the remnants of shacks and other informal structures that littered the inside of the derelict five-storey building in the heart of Johannesburg's central business district hours after the fire was extinguished. Smoke seeped out of the blackened building even though the fire was out, while twisted blankets and sheets hung like ropes out of shattered windows to show how people had used them to try and escape the flames.

Some of the survivors described how they jumped out of windows, but only after tossing their children to others below.

"Everything happened so fast and I only had time to throw the baby out," said Adam Taiwo, who managed to save his 1-year-old son and himself. "I also followed him after they caught him downstairs." Taiwo said he did not know where his wife, Joyce, was.

Fire Marshals inspect

A witness who lives in a building across the road said he saw others also throw babies out of the burning building and that at least one man died when he jumped from the third floor and hit the concrete sidewalk "head first."

Another witness who didn't give his name told television news channel eNCA that he lived in a building next door and heard people screaming for help and shouting "We're dying in here."

As the fire raged, some occupants got trapped behind locked gates at the exits and there were no proper fire escape routes, local official Tshwaku said.

"People couldn't get out," he said, adding that some of the victims may have died after jumping out of the building.

More than 200 people were living in the building, witnesses said, including in the basement, which should have been used as a parking garage. Others estimated an even higher number of occupants.

Johannesburg Mayor Kabelo Gwamanda said 141 families were affected by the tragedy but could not say exactly how many people were in the building when the fire started. Many of the people inside were foreign nationals, he said. That could make identifying victims and tracing the missing hard as many were likely in South Africa illegally, other officials said.

A woman who asked not to be identified said she lived in the building and escaped with her grown son and a 2-year-old child. She stood outside holding the toddler for hours and said she didn't know what happened to two other children from her family.

"I just saw smoke everywhere and I just ran out with this baby only," the woman said. "I don't have any home, and I don't know what to do anymore."

In a statement, South African President Cyril Ramaphosa said, "This is a great tragedy felt by families whose loved ones perished in this awful manner, and our hearts go out to every person affected by this event."

A spokesperson for Ramaphosa said he had offered the assistance of the national disaster management agency if needed, and the president later visited the scene having cancelled a Thursday evening television address on the BRICS economic summit held in Johannesburg last week.

Ramaphosa called the fire devastating and a "wake-up call" for South Africa's economic hub to address its inner-city housing crisis.

"We are not here to blame anyone," Ramaphosa said outside the burned building. "This is a difficult lesson for all of us."

Johannesburg is rated as Africa's richest city but its centre is run down and often neglected. Abandoned and broken-down buildings are common, and people desperate for some form of accommodation use them for shelter. City authorities refer to the structures as "hijacked buildings" and they have been a problem for years, if not decades.

While city authorities were catching much of the blame for the deaths, they said it was often difficult to get courts to issue orders to evict the homeless from such buildings.

The building in question was reportedly owned by the city of Johannesburg and is considered a heritage site, but was not being managed by the city. It was once the site of South Africa's notorious "pass" office, which controlled the movement of Black people under the racist system of apartheid, according to a blue historical plaque hanging at the entrance.

"Denied a place in the city, many were ordered to leave Johannesburg," the plaque reads.

Decades later, the deadly fire made the building a modern emblem of the exclusion of poor people in Johannesburg.

Speaking at the scene, the Gauteng province's police commissioner, Lt.-Gen. Elias Mawela, said the police were aware of approximately 700 buildings in central Johannesburg that were derelict and abandoned. He urged city authorities to act, and to bar squatters from the burned building in the future.

"Shut it down. That building." Mawela said.

Meanwhile, Mulaudzi, the emergency services spokesperson, said the fire took three hours to contain and firefighters then needed a long time to work through all five floors. He said there were "obstructions" everywhere that would have made it very difficult for residents to escape the deadly blaze and which hindered emergency crews trying to search the site.

The chance of anyone else being found alive hours after the fire broke out was "very slim," Mulaudzi said.

---

Imray reported from Cape Town, South Africa. AP writer Cara Anna in Nairobi, Kenya contributed to this report.