On Wednesday President Thabo Mbeki eventually approved the deployment of the defence force in Gauteng to help police stop the attacks on foreigners.
Presidential spokesman Mukoni Ratshitanga said the troops would also be deployed in other provinces if the need arose.
At least 42 people have died, hundreds have been injured and 400 arrested since the violence erupted in Alexandra almost two weeks ago.
In every volatile situation, deploying the army needs to come as a last resort. This is because, whereas the army normally serves as a deterrent - because of its inherent link with force - it can have a negative effect of turning citizens against the state.
This was the case during the apartheid era where the army was seen as a repressive force against oppressed people who were fighting for their rights.
A government official alluded to this possibility during a conversation we had earlier this week.
"If it happens that, for whatever reason, the army has to use force to deal with the situation, the people will turn around and say the ANC government is using the army to kill us," he said.
The situation becomes even more ominous when one takes into account the claims by the attackers that the foreigners are taking their jobs.
Not only would the government have put the poor in a situation where they have to compete with illegal immigrants for survival, it would now be seen to be using the army to suppress them.
It is understandable that bringing in the army is only a stop-gap measure to stabilise the situation.
However, the government must really tread carefully in this situation.
If it doesn't it might find itself having to defend its right to govern in a manner that could antagonise the very citizens in whose name it is supposed to govern.
What cannot be denied is that there is a need to find a long-term solution to this conflagration.
The first step is for the government to acknowledge that current immigration policies are not effective.
Burying its head in the sand and pretending that the situation in Zimbabwe has created a refugee crisis in this country is not helpful. It is a fact that the majority of illegal immigrants in this country are Zimbabweans.
Continuing to deal with the situation by differentiating between political and economic refugees is a failure to recognise the people are leaving Zimbabwe because of a socio-economic meltdown created by Robert Mugabe's economic and political behaviour.
It is an untenable situation where there are between three and five million people living in this country that the state cannot account for. This number is estimated to be equal to the whole white population in this country.
This means that there is such a huge number of people in this country who the state cannot, for example, ensure that they enjoy their rights as entrenched in the African Charter for Human and People's Rights - of which the country is a signatory.
Repatriation has so far proved to be a costly and ineffective strategy. Because of the deteriorating situation in their country, those repatriated to Zimbabwe return immediately. It is like trying to fill a leaking bucket.
The situation is further compounded by corrupt officials who regard these illegal immigrants as "ATMs".
South Africa is not unique when it comes to the issue of economic refugees. Several countries throughout the world face similar difficulties.
In Argentina, for example, the government has embarked on a programme of naturalising illegal immigrants.
The campaign, named Greater Homeland, entails calling on illegal immigrants to get registered and naturalised.
One way of ensuring that the illegal immigrants are complying with the call is to insist that only people with recognised identification can access government services such as health and education.
In conjunction with this should be a serious campaign to stem corruption in the Department of Home Affairs, where people are offered fake documents by corrupt officials.
Indeed, the Greater Homeland campaign may have the negative effect of having an influx of economic immigrants.
However, if implemented, for example, in conjunction with finding a lasting solution to the situation in Zimbabwe - the tide may eventually turn, with people staying in their now stable country.
On the other hand, the government must run a serious campaign where it deals harshly with employers who employ illegal immigrants unlawfully. Those found doing so must pay heavy fines.
This means that unscrupulous employers must not be allowed to exploit illegal immigrants, while on the other hand undermining the right of South Africans to fight for a living wage.
However, if indeed there are jobs that South Africans find to be too menial for them, the economic immigrants must be allowed to be legally employed in those jobs.
What these suggestions mean is that there is a need for joint solutions between South Africa and its neighbouring countries. The first step in this regard is to find a solution to the situation in Zimbabwe.