South African soldiers will be deployed to quell anti-immigrant violence that has killed at least seven people in several weeks of unrest, Defence Minister Nosiviwe Mapisa-Nqakula said Tuesday.
Police have struggled to contain mobs who have attacked foreigners from Zimbabwe, Malawi, Mozambique and other African countries in both the economic capital Johannesburg and in the port city of Durban.
The government had vowed to crack down strongly on the unrest, but the decision to put soldiers on the streets came after two nights of relative quiet in both cities.
"We come in as the last resort - the army will serve as a deterrent," Mapisa-Nqakula told reporters, declining to give details on how many troops would be involved and where.
"There are people who will be critical, but those who are vulnerable will appreciate this decision," she said.
"Now we deploying because there is an emergency.
"We are not here to take over the work of the police. We are simply here to give support to what the police are trying to do in their efforts to prevent a continuation of what we have seen."
The spate of attacks has revived memories of xenophobic bloodshed in 2008, when 62 people were killed in Johannesburg's townships, shaking South Africa's post-apartheid image as a "rainbow nation" of different ethnic groups.
The South African army was deployed to restore order in the 2008 riots, and has also been used against violent strikers in 2012 and 2014.
The military presence will focus on the township of Alexandra, a poor neighbourhood that has been roiled by xenophobic violence, including a Mozambican man stabbed to death in broad daylight on Saturday.
Graphic photographs of the killing were published in many South African and international newspapers and websites.
"I think it has shaken everybody," Mapisa-Nqakula said referring to the stabbing.
"South Africans now know... even those who probably did not take it seriously know that... we need to stand up.
"This is not too late, this is just the right time".
Foreigners are often the focus of resentment among poor South Africans who face a chronic jobs shortage, with youth unemployment rate over 50 percent.
Regional relations have been strained by the unrest, with Zimbabwe, Malawi and Mozambique organising for some worried citizens to return home.
Nearly 400 Malawians arrived overnight in the city of Blantyre in the south of the country, where they were met by government ministers and officials.
Holding her one-year-old daughter in her arms, Agnes Salanje said she "faced death" from marauding death mobs.
"We could have been killed as these South Africans hunted for foreigners, going from door to door," Salanje, who was a domestic worker in Durban, told AFP.
Salanje, who was paid $200 a month, said she escaped the attackers after being "tipped off by a good neighbour and we ran to a mosque to seek shelter."
"I will not go back. It is better to be poor than be hunted like dogs because you are a foreigner," she said.
"I lost everything. I only managed to grab a few clothes for myself and my baby."
Zulu king Goodwill Zwelithini on Monday denied he had triggered the outbreak of xenophobic hatred in a speech last month when he blamed immigrants for rising crime and said they must leave South Africa.
The king told a rally of several thousand Zulus that the media had misrepresented his speech, which was widely seen as inciting the attacks.
President Jacob Zuma has moved to counter accusations that he was slow to react, telling parliament last week that attacks were "shocking and unacceptable".
"No amount of frustration or anger can ever justify the attacks on foreign nationals and the looting of their shops," he said.