Audio By Carbonatix
South African President Jacob Zuma has visited a refugee camp in the port city of Durban after a fresh outbreak of anti-foreigner violence.
Mr Zuma told those who had fled the violence that it went against South African values and that he would bring it to an end.
He was jeered by some in the crowd who accused him of acting too slowly.
At least six people have died in xenophobic attacks in Durban, with violence spreading to other areas.
Migrants, mostly from other African states and Asia, have moved to South Africa in large numbers since white-minority rule ended in 1994.
Many South Africans accuse them of taking jobs in a country where the unemployment rate is 24%.
Mugabe 'disgust'
In a statement, Mr Zuma said: "These attacks go against everything we believe in. The majority of South Africans love peace and good relations with their brothers and sisters in the continent."
Then, as he visited the refugee camp in the Chatsworth area of Durban - after cancelling a trip to Indonesia - Mr Zuma said in a televised speech: "We are certainly going to stop the violence."
Addressing migrants who were planning to return to their home countries, he said: "Those who want to go home, when the violence stops you are welcome to return."
Mr Zuma said it was a minority that was causing trouble, but the BBC's Southern Africa correspondent, Karen Allen, says he was heckled by some in the crowd who branded his visit as too little, too late, adding that they were planning to leave South Africa altogether.
During the anti-immigration violence in the past fortnight, police have arrested 150 people for public-order related offences.
Several thousand foreigners have fled their homes to shelter in makeshift camps, and neighbouring Zimbabwe, Malawi and Mozambique have announced plans to evacuate citizens.
On Saturday, Zimbabwean President Robert Mugabe, speaking as chair of both the Southern African Development Community and African Union, said: "I would want now to express our sense of shock, disgust, as we abhor the incidences which happened in Durban."
Small groups attacking shops in several areas around Johannesburg on Saturday.

Police used rubber bullets to disperse looters in Alexandra, a township north of the city, with more than 30 people arrested.
Zulu King Goodwill Zwelithini has been accused of fuelling the attacks by saying that foreigners should "go back to their countries". However, he says his comments were distorted.
Official data suggests there are about two million foreign nationals in South Africa, about 4% of the total population. But some estimates put the number of immigrants at five million.
Latest Stories
-
10 illegal miners remanded into prison custody for mining under ECG high-tension poles
21 minutes -
House of Chiefs urges Ghanaian workers to commit to environmental protection
43 minutes -
OSP saga: A legal analysis demonstrating that A-G authorization was long granted
54 minutes -
Fifth unit at Akosombo goes live as grid recovery nears final stages
59 minutes -
WAJESHA condemns SA xenophobic attacks, warns of growing public and mental health crisis
1 hour -
The human face of digital finance and its hidden cost
1 hour -
PRESEC-Legon 2020 NSMQ star Benjamin Nketsiah wins award for breast cancer detection project
1 hour -
Banksy confirms he’s behind statue in central London
1 hour -
Capital access takes centre stage at 3rd women in business dialogue in Kumasi
2 hours -
Dr Zanetor Agyeman-Rawlings elected 2nd Deputy President of Pan African Parliament in South Africa
2 hours -
Atwima Nwabiagya, GAYO sign MoU to cut reliance on Oti landfill
2 hours -
Aboakyer Festival reflects unity, heritage and enduring leadership – MTN
2 hours -
Former GWL MD begins constituency tour ahead of Savannah NPP chairmanship race
2 hours -
YEA leadership engages Central Region staff, reaffirms commitment to youth empowerment and staff welfare
2 hours -
Two dead, 2 in police custody after foiled robbery on Yapei–Tamale Highway
2 hours