BAKERSFIELD, Calif. (AP) — The Kern County Sheriff's Office says a deputy shot and wounded a dog that broke loose from a yard and attacked a man.

The office says deputies were doing an investigation Monday afternoon in East Bakersfield when the pitbull got out of a side yard at a residence in the area and bit the man on the arm and leg.

A nearby deputy used a Taser to try to stop the attack but it had no effect.

The deputy then fired one shot from a firearm and immobilized the dog.

The man was taken by ambulance to a hospital where he was reported in stable condition.

The dog was still alive when it was picked up by animal control authorities.