SAN ANTONIO — A man accused of assaulting people with a baton in a San Antonio parking lot is hospitalized in critical condition after he was shot by an officer when an electronic stun gun failed to subdue him.

Police Chief William McManus says the officer was responding to calls Saturday night about a man assaulting people outside a Walmart. Witnesses pointed the officer to a nearby drainage ditch where the chief says the man pulled a knife on the officer. The stun gun failed but the officer received an electric shock because he was standing in water.

The officer then pulled his service weapon and shot the man, believed to be homeless, three times.

The officer wasn’t seriously hurt. McManus says he’ll be on administrative duty pending the outcome of an investigation.