South African security ministers have been discussing using the army to help stop a wave of attacks on foreigners, which has left at least 23 people dead.
The deployment of troops, which has been demanded by human rights groups and the opposition, could not be ruled out, said a top ruling party official.
The violence has spread to four new areas near Johannesburg, while 13,000 have reportedly fled their homes.
President Thabo Mbeki has condemned the "shameful and criminal" violence.
Mobs of South Africans have been roaming townships, looking for foreigners, many of whom have sought refuge in police stations, churches and community halls.
What kind of nation are we building - one which rejoices at someone who is burning, who is engulfed by flames?
Gauteng Premier Mbhazima Shilowa
There are believed to be between three and five million foreigners living in South Africa - most are Zimbabweans fleeing poverty and violence at home.
The attacks have spread to new areas in the Ekurhuleni region around Johannesburg, local official Zweli Dlamini told the BBC.
In the latest attacks, two people, believed to be miners from Mozambique, were beaten to death, reports South Africa's Independent Online website.
There have also been reports of attacks on South Africans from other parts of the country.
Home Affairs Minister Nosiviwe Mapisa-Nqakula has promised that no illegal migrants would be deported during the attacks.
Her husband, Safety and Security Minister Charles Nqakula, promised that those who had fled their homes would be given adequate shelter.
ANC secretary general Gwede Mantashe said that if the army was deployed, it would be to back up the police.
Police reinforcements have already been sent to the affected areas and President Mbeki said they would get "to the root of the anarchy".
On Monday, a coalition of human rights groups, called the attacks a "national emergency" and urged the government to "consider whether deployment of the military is not necessary at this stage".
The police say they have made another 40 arrests overnight, on top of the 250 in recent days.
Mobs of South Africans roam townships
Gauteng Premier Mbhazima Shilowa said the police would make the decision on whether it was necessary to call in the army.
"The situation is dire and we must intervene and intervene forcefully," he said in a debate in the Gauteng legislature.
"What kind of nation are we building - one which rejoices at someone who is burning, who is engulfed by flames?" he asked in reference to a shocking photograph used on the front pages of several newspapers on Monday.
Mr Mantashe also said the ANC had held talks with the mainly Zulu opposition Inkatha Freedom Party and noted that most of the flashpoints had been in areas where the IFP had a presence.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.