South Africa's high court has ruled that camps housing foreigners displaced by xenophobic violence in May can be shut down.
The judge said the authorities had no obligation to reintegrate more than 4,000 African immigrants living in the camps around Johannesburg.
The government plans to close the shelters in Gauteng province on Friday.
Human rights groups had applied to stop the closure, saying it would violate the rights of the displaced.
The authorities argue it is now safe for the foreigners to return to their homes.
Tens of thousands of immigrants were displaced by the violence, in which 60 people were killed.
"Our clients will be rendered homeless and vulnerable to further xenophobic attacks"
Many returned to their home countries, some have returned to South African townships – but approximately 4,000 of them are still in the safe havens in Gauteng.
A lawyer for the human rights groups that brought the case, Stuart Wilson, said they would appeal the decision at the Constitutional Court, the country's highest court, as soon as possible.
"The South Africa government said these camps would be temporary pending the implementation of a comprehensive integration plan. Such a plan has not been devised or implemented," he told the BBC's Focus on Africa programme.
'Vulnerable'
There were reports that one of the shelters was being dismantled three days ahead of the deadline, Mr Wilson said.
"If it [the deadline] isn't extended, our clients will be rendered homeless and vulnerable to further xenophobic attacks," he said.
"They'll lose access to water, lose access to food and lose access to the only security they've been able to enjoy for the last two months."
The BBC's Mpho Lakaje in Johannesburg says many of the immigrants living in the Gauteng camps lost their personal belongings when their homes were destroyed in the mayhem.
They say they are not ready to leave South Africa and return to their countries of origin.
"The economy's down. I can't even scratch for a living [at home]," one man told the BBC.
The riots 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.
^ Back to top | BBC Sport Home | BBC Homepage | Contact us | Help | ©