A deputy with the Bexar County Sheriff's Office was shot in the abdomen as he confronted a teen who was attempting to break into his personally owned vehicle Saturday morning.

According to MySA.com, the deputy was able to apprehend and hold onto the gunman despite having suffered a gunshot wound to his abdomen.

Responding officers with the San Antonio Police Department then arrested the teen and took him into custody.

The wounded deputy was transported to a nearby hospital where he underwent surgery.

The deputy—whose name has not been released—is reportedly an 11-year veteran who works the overnight shift at the Bexar County Adult Detention Center.