Immigrants have fled South Africa’s main township, Soweto, following xenophobic attacks which killed three people on Wednesday.
Violence broke out after locals accused a Somali shop owner of shooting a teenager and his friend who allegedly tried to break into his store.
Police believe this triggered the chaotic scenes of looting and violence, which spread to other areas of Soweto.
Residents also accused shop owners of selling expired foods.
A police statement says total of 27 people have been arrested.
It condemned those who had taken the law into their own hands, and described the disturbances as tantamount to anarchy.
Reports suggested that the unrest continued into Wednesday evening.