Several thousand demonstrators have marched through central Johannesburg to protest against a spate of deadly attacks on immigrants.
Crowds sang songs denouncing xenophobia and carried banners that read "We are all Africans" on Thursday.
The marchers passed through neighbourhoods that are home to many immigrants, a large number of whom come from other African countries. Migrant workers crowded balconies, shouting their support.
Al Jazeera's Charles Stratford, reporting from the rally, said that "the protesters are keen to stress that these attacks are in no way representative of South Africa".
"This march sends an important message to the world, to Africans," David Makhura, premier of Gauteng province, of which Johannesburg is the capital, told the demonstrators.
"We are going to defeat xenophobia like we defeated apartheid."
Zain Mayet, 20, told the AFP news agency: "I am here to make a stand, to say 'Not in my name',"
"Keeping quiet makes me as guilty as those who are committing violence."
Soldiers were deployed in Johannesburg this week to aid police in operations against hostels in Johannesburg's Alexandra township housing South African men who are accused of targeting migrants from Zimbabwe, Malawi, Mozambique and other African countries.
In total, more than 300 people have been detained.
At least seven people have been killed in three weeks of unrest that have revived memories of xenophobic bloodshed in 2008, when 62 people were killed.
The unrest erupted in the port city of Durban about three weeks ago and later spread to Johannesburg.
Many immigrants have been forced to flee their homes and abandon their small shops as marauding mobs hunted down foreigners at night.
"Over 5,000 people from Malawi, Zimbabwe, Mozambique, Democratic Republic of Congo and Burundi still seek refuge in displacement camps," Medecins Sans Frontieres (Doctors Without Borders) said in a statement.
"Injured Malawian and Zimbabwean men told medics that they are too afraid to openly seek medical treatment for their wounds and fractures for fear of further attack."
President Jacob Zuma has pledged to tackle anti-migrant sentiment in South Africa and to address deep-rooted problems behind the attacks.
"South Africans are not xenophobic," he said on Wednesday. "If we don't deal with the underlying issues, it will come back."
Zuma gave few details of government plans, but said the violence was driven by "criminal elements" as well as friction between foreigners and locals.
Source: Al Jazeera And AFP