Police fired rubber bullets to disperse crowds as businesses remained shut in two of South Africa's biggest cities. The violence erupted in Soweto, outside Johannesburg, and in Durban, a major east coast port, on Thursday.
The demonstrations were fuelled by anger over a Constitutional Court ruling that would allow some migrants who arrived illegally to apply for asylum. The ruling has led to long queues outside immigration centres.
On Friday, the government said it would change the way it complies with the ruling, without giving details. The Department of Home Affairs said the current policy had left its staff "overwhelmed" and that "serious threats to public safety and order had emerged". It said the new policy would still abide by the court ruling.
Thursday's demonstration turned violent after allegations that a foreign national had assaulted one of the protesters in Durban. Police said three foreign nationals were arrested in connection with the alleged incident.
South Africa has experienced repeated outbreaks of xenophobic violence, often targeting migrants from neighbouring countries.