Some parts of Johannesburg resembled a war-zone
Some 6,000 people have fled a wave of attacks on foreigners in South Africa, which has left at least 22 dead, aid workers say.
"This is a classic refugee situation," Rachel Cohen from Medecins Sans Frontieres (MSF) told the BBC.
Many of those who have sought refuge in police stations, churches and community halls are Zimbabweans, who have fled violence and poverty at home.
Up to three million Zimbabweans are thought to be in South Africa.
The BBC's Caroline Hawley in Johannesburg says the immigrants have become a scapegoat for social problems, such as unemployment, crime and a lack of housing.
Mobs of South Africans continue to roam around some townships near Johannesburg, looking for foreigners and looting their shops.
But there have also been attacks on South Africans from other parts of the country, especially from near the Zimbabwean border.
Over the weekend, correspondents say central Johannesburg resembled a war-zone, as armed police used tear gas and rubber bullets to disperse angry crowds.
"If we go back into the streets, they're going to kill us there," one Zimbabwean man seeking sanctuary in a police station told the BBC.
Some Zimbabweans say they will go home, despite the political violence there, rather than face attacks in South Africa.
The front pages of several South African newspapers on Monday show a horrific image of a man being burnt to death.
The police say they have made more than 200 arrests for crimes including murder, rape and robbery.
"We're not talking about xenophobia, we're talking about criminality," said police spokesman Govindsamy Mariemuthoo.
He said police reservists and officers from other regions had been called in to help quell the violence, reports the AP news agency.
Loren Landau, from the Wits University Forced Migration Studies Programme, said the nature of the attacks was changing.
"We're seeing what was an anti-foreigner conflict transforming into what might be seen as an ethnic conflict," he told the BBC's Focus on Africa programme, pointing to the attacks on South Africans.
He also said much of the violence was "opportunistic crime".
'State of emergency'
A church where about 1,000 Zimbabweans have been taking refuge was attacked over the weekend.
Bishop Paul Veryn of the Central Methodist Church which was attacked told SABC radio: "We consider that the situation is getting so serious that the police can no longer control it."
He called for a state of emergency to be declared.
Scenes of violence on the streets of Johannesburg
MSF spokesman Eric Goemaere said: "This reminds me of a refugee situation. I have treated bullet wounds, beaten people, rape victims, and the people are terrified."
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.
President Thabo Mbeki said he would set up a panel of experts to investigate the violence.
The leader of the governing African National Congress, Jacob Zuma, has also condemned the attacks.
"We cannot allow South Africa to be famous for xenophobia," he told a conference in Pretoria.
But the Human Rights Commission on Monday accused the government of not doing enough to address the underlying problems.
"There has been poor leadership in this country as far as these issues are concerned," HRC chief executive Tseliso Thipanyane told public radio.
He pointed out that there was a wave of attacks on foreigners in the late 1990s, before the situation eased in following years.
Since the end of apartheid, migrants from across Africa have gone to South Africa, attracted by its relative prosperity.