South Africa's military, which has been called in to help quell the growing number of attacks on immigrants, earlier said its soldiers had shot dead a man in a Johannesburg township.
General Kwena Mangope, an army spokesman, said: "We unfortunately had an incident where a member of the public was shot when he pointed a firearm at a soldier. He was shot dead."
The army said the man was killed on Friday at about 6pm (16:00 GMT) in the East Rand area.
"A male was allegedly assaulting a woman. Our men confronted him and then he pointed a firearm at them," Mangope said.
Attacks on immigrants, who are being blamed by many for South Africa's high crime rate and unemployment levels, have spread to seven of South Africa's nine provinces.
Many immigrants from Zimbabwe, Mozambique and Malawi have been living in South Africa but have fled back to their homelands to avoid the violence.
More than 500 people have been arrested in connection with the attacks.
The army was deployed on the streets of Johannesburg on Thursday for the first time since the end of apartheid in 1994.
African Union officials have expressed shock at the attacks in Africa's most developed nation.
Thabo Mbeki, South Africa's president, bowed to pressure to call in troops after a request from the police.
Some suggested the call to the military was an overreaction and raised fears about using troops who lacked the training to control crowds of people.
Many remember that, under white apartheid rule, the army was frequently called upon to help police put down civil unrest by blacks in poor townships and such incidents often ended in violence.
Phumzile Mlambo-Ngcuka, South Africa's deputy president, on Friday apologised for the unrest.
"We reject the notion that some of the people who are living in South Africa who are not South Africans can be blamed for the problems that we have," she said during a trip to Nigeria.
During her tour, violence was reported in Cape Town, South Africa's second city and a major tourist destination.
Thabo Mbeki, president of South Africa, called the wave of deadly attacks on migrants an "absolute disgrace" and said his government would take all necessary measures to bring those responsible to justice.
"We must acknowledge the events of the past two weeks as an absolute disgrace," Mbeki said in a televised address, his first since the xenophobic outbreak began on May 11 in Johannesburg.
At least 50 people have died in attacks across the nation.