Foreigners were forced into temporary camps in May
South African police have forcefully removed hundreds of immigrants from temporary shelters where they had taken refuge from xenophobic attacks.
Authorities say the immigrants, who were taken to a repatriation centre in Johannesburg, had not registered with the home affairs department.
They now face deportation to their home countries, officials said.
More than 60 immigrants were killed and tens of thousands more fled during the attacks against foreigners in May.
A BBC reporter witnessed angry and emotional scenes at the Glenanda temporary centre as they were removed.
Some immigrants chanted "human rights for refugees" as they were driven away by dozens of riot police.
The BBC's Mpho Lakaje said the immigrants taken from the camp, where about 2,000 people were sheltering, included women and children.
"It is not the South African government's intention to deport a huge group of people, but we want to identify the ring leaders [behind unrest at the camp] and deport them," Home Affairs Minister Nosiviwe Mapisa-Nqakula told South Africa's Independent newspaper.
Home Affairs spokeswoman Cleo Mosana said the immigrants had been offered exemption from deportation but had not taken it up.
She said they had been given enough time to apply for proper documentation, but had refused to do so.
Many foreigners said the registration process was not clearly explained, or that they did not register because they feared losing their refugee status.
The government denied this would happen.
One woman from the Democratic Republic of Congo said her sister was among those taken away.
"They are going back to their country, but I know in our country there is still fighting," she said.
Marylyn Mill, a volunteer who had been helping at the shelter, said she was "very, very disappointed".
"I'm ashamed to be a South African, that this is how people in my country can be treated by our government."
The violence began in a township north of Johannesburg before spreading to other parts of the country.
It was the worst bloodshed in the county since the end of apartheid in 1994.
Those attacked in May were blamed for fuelling high unemployment and crime.
Twenty-one South Africans, mistaken by gangs for foreigners, were among those killed.