An officer with the Houston Police Department accidentally shot himself during training on Tuesday morning.

According to ABC News, the officer was attempting to unholster his service weapon during training at the agency's police academy when the gun accidentally discharged, causing a bullet to enter his thigh and exit through his ankle.

The officer—a 27-year veteran whose name has not been released—was transported to a nearby hospital for treatment.

The agency said on Twitter that he is conscious and stable.