At least 45 people have died in floods and mudslides after rainstorms struck the South African port city of Durban and surrounding KwaZulu-Natal province, the authorities said.

"The latest reports indicate that over 45 people have lost their lives as a result of the heavy rains, this number could possibly increase as more reports come in," the province's Department of Cooperative Governance announced in a statement.

Days of pounding rain flooded several areas and shut dozens of roads across the southeastern city, while landslips caused train services across KwaZulu-Natal to be suspended.

Video footage shared by private emergency and rescue workers and paramedics showed flooded city highways, submerged cars and collapsed houses.

The disaster management department in KwaZulu-Natal province, of which Durban is the largest city, urged people to stay at home and ordered those residing in low-lying areas to move to higher ground.

More than 2,000 houses and 4,000 "informal" homes, or shacks, have been damaged, provincial premier Sihle Zikala, told journalists in a briefing broadcast live on television.

Rescue operations, aided by the military, are under way to evacuate people trapped in affected areas, the provincial Department of Cooperative Governance said.

Those trapped include teachers and students at a Durban secondary school, it said.

Durban mayor Mxolisi Kaunda earlier told reporters that power stations had been flooded and water supplies disrupted -- and that even graveyards had not been spared the devastation.

Footage on public broadcaster showed several shipping containers strewn on a freeway in the city, one of southern Africa's regional gateways to the sea.

The city had only just recovered from deadly riots last July in which shopping malls were looted and warehouses set on fire, in South Africa's worst unrest since the end of apartheid.

A local humanitarian agency, Gift of the Givers, said in a statement: "The need of the hour is huge."

It said transport infrastructure had suffered massive damage and some people were trapped beneath collapsed walls.

The country's rail service PRASA said landslips and rubble on the tracks had forced it to suspend all train services in the province.

"It's an absolute nightmare. Plenty of mudslides, people passing (dying), buildings collapsed," said Garrith Jamieson, director of Durban-based ALS Paramedics Medical Services, as he predicted "more fatalities".