Authorities in San Antonio, Texas, shot a man Wednesday night who they say was stabbing a woman with a pencil.

It happened just before 8 p.m. in front of the Baptist Medical Center downtown, our affiliate KABB reports. According to San Antonio Police Chief William McManus, the 25-year-old man was on top of a woman, stabbing her with a pencil.

Two mental health unit police officers happened to be just inside the hospital when they heard the woman’s screams. When the officers intervened, the suspect turned on them and attacked. That’s one of the officers then shot the man.

The suspect was hit in the torso and transported to San Antonio Military Medical Center for treatment. No word on his condition. The woman has minor injuries.

The officer who shot the suspect is a 9-year veteran. Chief McManus tells us the woman told the officer, “You saved my life.”