At least 300 people gathered for an anti-immigration march in the South African capital Pretoria on Friday, as President Jacob Zuma condemned xenophobic violence that has targeted shops and homes.
Tyres were burnt in streets near Pretoria in the morning, as tensions rise between some South Africans and migrants from Nigeria, Zimbabwe, Somalia, Pakistan and elsewhere.
Shops and homes owned by foreigners have been looted and torched in recent weeks, with some locals alleging that the properties were brothels and drug dens.
Zuma called for restraint, saying in a statement that there had been "threats of violence and acts of intimidation and destruction of property directed at non-nationals."
"Residents in some communities blame non-nationals for the escalating crimes especially drug trafficking," the presidency said.
He called for South Africans not to blame migrants for the country's widespread crime problems, but said the government would crack down on drug-dealing and illegal immigrants.
The violence prompted Nigeria to summon South Africa's top envoy to Abuja on Thursday to raise its concerns.
Attacks against foreigners have erupted regularly in recent years in South Africa, fuelled by the country's high unemployment and poverty levels.
In the last week, more than 20 shops have been targeted in Atteridgeville, outside Pretoria, while residents in Rosettenville, south of Johannesburg, attacked at least 12 houses.
"We have decided to not to leave the house (during the anti-migrant march)," Alain Bome, 47, from Democratic Republic of the Congo who has been in South Africa for 14 years, told AFP.
"We know very well there have been attacks. We are scared because we know South Africans."
In 2008, South Africa experienced its worst bout of xenophobic violence, which left 62 people dead.
In 2015, at least seven people died in similar unrest in Johannesburg and the Indian Ocean city of Durban as African immigrants were hunted down and attacked by gangs.