A former South African soldier has been shot dead outside Nelson Mandela's house in Cape Town after he opened fire on security guards.
Mandela was said to be shocked by the shooting
A police spokesman said three men arrived at the building asking to speak Mr Mandela or the Anglican archbishop, Desmond Tutu.
They firstly said they had information about a plot to disrupt the forthcoming election and then started shooting.
South Africa's ex-president was not in residence at the time.
A joint statement from the South African ministers of defence, security and intelligence said the dead man was a former member of the National Defence Force (SANDF) who had been discharged earlier this year.
He is believed to have been wanted in connection with the theft of weapons from a military base in Johannesburg last week.
One of the weapons was recovered at the scene of the shooting.
The ministers also said the army had been concerned about the man's state of mind.
A spokeswoman for Mr Mandela said he had been "completely shocked" by the incident.
"An incident of this nature is always disturbing as it involves the possibility of loss of life," Zelda le Grange said.
"The safety of Mr Mandela, his family and staff is paramount to us all."
Police are holding the other two men involved in the incident for questioning.