SAN ANTONIO – A Bexar County Sheriff’s Office detention deputy is recovering after accidentally shooting himself.

The deputy was participating Tuesday in an in-service training to maintain his peace officer license.

The unidentified deputy has worked with the Sheriff’s Office for four years, with the hope of someday being put on patrol.

He was attempting to pull his weapon at the county’s firearms training center, off Farm Road and Southton, when he accidentally shot himself in the hip. One of the instructors noticed the injury and provided the deputy with medical attention.

An ambulance took the deputy to SAMMC, where he is in stable condition.

Sheriff’s Office spokesman James Keith said it’s a training instructor’s worst nightmare to see someone injured by his or her own gun or someone else’s during training exercises.

“Our hearts go out to him. We hope that he has a speedy recovery, and we plan to use this as a lesson for others. And we hope to make some positive out of it,” Keith said.

An internal investigation is underway to determine whether the deputy will face disciplinary actions or a change in duties as a result of the shooting, which authorities said appeared to be accidental.