Senior state advocate Addelaid Ferreira-Watt has died after she was shot at the regional court in Ixopo, KwaZulu-Natal, in what appears to be an accident on Monday.
A case of culpable homicide was being probed after the apparent freak shooting, KZN police confirmed.
The weapon - believed to be a loaded shotgun - was brought to court as evidence.
"It is alleged that the weapon was brought to court to be entered as evidence in a house robbery case when it accidentally discharged in court," said Brigadier Jay Naicker.
UPDATE | Shattered and heartbroken: Tributes pour in for top state advocate Ferreira-Watt
He said that the 51-year-old later died in hospital. "She was taken to hospital after she was struck by a bullet on the left of the hip."
"Unfortunately, we cannot divulge further information as the investigations are at a sensitive stage," he said.
Several people, including former Hawks KZN boss Johan Booysen, have expressed their shock at Ferreira-Watt's death.
- Additional reporting by Sheldon Morais