Nigerians were attacked in the capital, Pretoria, at the weekend
South African police have used rubber bullets, tear gas and water cannon to try and disperse anti-immigrant protesters in the capital, Pretoria.
A low-flying police helicopter has also been deployed amid a stand-off between local protesters and foreigners, with both groups reportedly armed with sticks, bricks and knives.
President Jacob Zuma had called for calm ahead of the anti-immigrant march.
Many unemployed South Africans accuse foreigners of taking their jobs.
Mr Zuma has condemned the acts of violence and intimidation directed at African immigrants living in South Africa.
Earlier this week, angry mobs attacked Nigerians and looted shops belonging to Somalis, Pakistani and other migrants in townships around Pretoria and parts of Johannesburg.
He said many foreign citizens living in South Africa were law-abiding and contributed to the economy.
“It is wrong to brandish all non-nationals as drug dealers or human traffickers. Let us isolate those who commit such crimes and work with government to have them arrested, without stereotyping and causing harm to innocent people,” the president said in a statement.
He said he would be championing the fight against crime to promote safer and more stable communities.
The home affairs minister announced plans on Thursday to inspect workplaces to see if firms are employing undocumented foreigners.
South Africa experienced its worst outbreak of violence against foreigners in 2008, when more than 60 people died.
Two years ago, similar xenophobic unrest in the cities of Johannesburg and Durban claimed seven lives as African immigrants were hunted down and attacked by gangs.