A prominent South African prosecutor was killed in court this week by a loaded gun that discharged when it somehow fell, according to reports.

Addelaid Ann Ferreira, 51, was in Ixopo regional court when the weapon was introduced as an exhibit in a robbery case, fell and accidentally fired, the Sunday Times reported.

The lawyer was shot in the left side of the hip and brought to the hospital, where she died from her injuries, police said.

Umzimkhulu police said they’re investigating the fatal incident as a culpable homicide.

“Unfortunately, we cannot divulge further information as the investigations are at a sensitive stage,” police spokesperson Brigadier Jay Naicker told News24.

Ferreira’s employer confirmed her death in a letter to colleagues.

“Her untimely passing is mourned by all. Our thoughts and prayers are with her family during this difficult time. The family has requested that their privacy be respected,” KwaZulu-Natal director of public prosecutions Elaine Zungu wrote, according to the outlet.

Ferreira’s loved ones remembered the lawyer Tuesday for having a “compassionate heart.”

“You have outstanding charisma, cool logic and a compassionate heart,” Ric Holt wrote in a Facebook tribute.