south africa xenophobic attacks
An African immigrant holds a machete in a run-down district of east Johannesburg Siphiwe Sibeko/Reuters

Immigrants in South Africa described their terror as they were hunted "like dogs" by xenophobic gangs.

As the army was dispatched on 21 April to keep the peace in Johannesburg and parts of KwaZulu-Natal province, migrants told of fearing for their lives as they fled the gangs.

"We could have been killed as these South Africans hunted for foreigners, going from door to door," Agnes Salanje from Malawi told AFP.

Salanje said she was paid $200 as a domestic worker in Durban and was able to escape the anti-immigrant violence that tore through the city in recent weeks, after being "tipped off by a good neighbour and we ran to a mosque to seek shelter".

She fled back to Malawi and said "I will not go back. It is better to be poor than be hunted like dogs because you are a foreigner. I lost everything. I only managed to grab a few clothes for myself and my baby Linda."

Thousands of foreigners fled the violence in Durban, with many returning to their home countries or taking refuge in temporary camps.

The violence spilled over into other parts of the province and to Johannesburg, claiming seven lives so far.

Zimbabwe immigrant Stanley Ndlovu, who works as a cleaner and gardener in Johannesburg, said spoke of the climate of fear among immigrants in the city who had chosen to stay.

He told CNN he was too afraid to leave his house, even to visit the shops for fear of being attacked by anti-immigrant gangs.

On 19 April, immigrant Emanuel Sithole was stabbed to death in a Johannesburg township, in an attack caught on camera by a press photographer.

Ndlovu accused authorities of failing to do enough to catch those responsible for the violence. "To stop violence they need to arrest and sentence the perpetrators," he said.

The attacks are alleged to have started when Zulu King Goodwill Zwelithini called for immigrants to go home. He denies his comments constituted an incitement to violence.