The Durban attack prompted about 700 African migrants to seek refuge in a nearby church while in Cape Town a safety forum has been set up to try to prevent violence.
Police say a group armed with sticks and bottles attacked Nigerians drinking in a tavern overnight.
In Johannesburg, police fired rubber bullets to disperse mobs in one area on Tuesday.
There are fears that politicians are exploiting the situation in Durban.
Mobs of South Africans roam townships
"A mob of plus/minus 200 were gathering on the streets carrying bottles and knobkerries (wooden clubs) busy attacking people on the streets," Provincial police spokeswoman Superintendent Phindile Radebe told AFP news agency.
"They attacked one of the taverns there believed to be owned by Nigerians," she said.
KwaZulu-Natal's Community Safety Minister Bheki Cele blamed Zulu nationalist Inkatha Freedom Party members for being behind the Durban violence.
"These are purely criminal activities and they will be dealt with decisively in ensuring that xenophobic attacks are not used as scapegoats for criminals who want to serve their own selfish interests," he said in a statement.
The attacks on foreigners began a week ago in the township of Alexandra, north of Johannesburg, before spreading to the city centre and across the Gauteng region.
Mobs have been roaming townships looking for foreigners, many of whom have sought refuge in police stations, churches and community halls.
Some South Africans say foreigners are taking jobs from locals and contributing to crime.
Earlier, President Mbeki urged South Africans to welcome foreigners.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.