A roof at a South African shopping mall that was under construction collapsed with a thunderous bang, killing two people and injuring 29 as survivors screamed for help.

Rescue teams used cranes, sniffer dogs and spotlights as the search for any more survivors stretched into the night.

The collapse happened in Tongaat, near the eastern coastal city of Durban, and rescue teams rushed to help workers who were trapped beneath the rubble.

"The dogs are now combing the area for survivors," police Lt. Mandy Govender said Tuesday evening. "There's just chunks and chunks of concrete and we don't know what's underneath."

The deputy mayor of the municipality that includes Tongaat said construction should not have been taking place because contractors were not doing a proper job, the South African Press Association reported.

"We took them to court a month ago," Nomvuzo Shabalala said. "We thought they had stopped."

There were initial reports that up to 50 people were trapped in the debris. Police were checking names, and said some workers reported as missing may have left the scene before notifying authorities.

Fiona Moonean, a resident whose house is located across a railway line from the collapsed part of the mall, said she was washing dishes at the time of the incident, SAPA reported. A few days earlier, Moonean said, workers had started to remove the scaffolding.

"Just after 4.30pm, it was a thunderous sound. Before the bang, I heard too much scaffolding fall," Moonean told SAPA. "The whole concrete slab crashed down with the pillars. The smoke and dust was too thick. I heard them screaming out for help in Zulu."

She called emergency services and a woman took down her details, according to SAPA.

"She had to calm me down because I was so freaked out," Moonean said. "For me, the most traumatic is the sound of the guys' voices. That is the part that plays in my head."

Photographs taken by Crisis Medical, a medical response company, showed slabs of concrete and toppled scaffolding at the mall, which sits beside railway tracks. First responders parked their vehicles nearby, emergency lights flashing. Some carried stretchers with injured workers from the rubble.

Authorities appealed to residents in the area to stay away from the scene so that rescue teams could work more quickly.