Up to 5,000 people have taken part in a rally against xenophobia in South Africa's coastal city of Durban following attacks on foreigners.
President Jacob Zuma condemned the violence, which have claimed at least five lives, as "shocking", and called for calm to be restored.
The Zulu king has been accused of fuelling the attacks. He denies this.
Many jobless South Africans accuse foreigners of taking jobs in a country where the unemployment rate is 24%.
"No amount of frustration or anger can justify the attacks on foreign nationals and the looting of their shops," President Zuma told parliament on Thursday.
For the latest news, views and analysis see the BBC Africa Live page.
Protesters marched through Durban chanting "Down with xenophobia" and "A United Africa", led by the city mayor and the premier of KwaZulu-Natal province.
Marcher Vanessa Govender told the BBC: "It's just a mammoth show of support for all those foreigners who have fallen victim to the past two weeks of xenophobic violence."
As the march was held, anti-immigrant protesters clashed with police, but were reportedly dispersed by water cannon and pepper spray.
The latest wave of violence against foreigners erupted in the Durban area before spreading to other parts of the country.
In Johannesburg on Thursday, police fired tear gas and rubber bullets at a crowd chanting anti-immigrant slogans after attacks on foreign-owned shops. Dozens of migrants sought refuge in a police station.
Malawi has said it would evacuate its nationals from South Africa and Kenya says it is preparing to do the same. Mozambique has set up border camps to cope with the exodus of its citizens.
At the scene: Milton Nkosi in Benoni, east Johannesburg
Parts of Benoni look like a ghost town.
Foreign-owned shops were forced to bring down the shutters because of skirmishes earlier in the day. I met shop owner Sharif Danis, originally from Nigeria and resident here for more than 15 years.
He tells me that he is scared because if he does not open the shop, he does not know where he is going to get money to pay the rent and buy food for his four children.
Mr Danis points out that the tavern next door - run by a South African businessman - is the only place open in the area. But he gets along with his neighbour and the South African insists that Sharif is his "brother from another mother" and should be operating and making money.
Like President Jacob Zuma, people here are worried and ashamed by what their compatriots have done.
Many foreigners, mostly from other African states and Asia, have moved to South Africa since white-minority rule ended in 1994.
At least 62 people died in xenophobic attacks that swept South Africa in 2008.
The government-backed South African Human Rights Commission (SAHRC) is investigating complaints of hate speech made against Zulu King Goodwill Zwelithini.
He was widely quoted as saying last month that foreigners should "go back to their countries". However, he said that his comments had been distorted.