READING TOWNSHIP, Mich. (AP) — A sheriff’s deputy bitten by a dog in southern Michigan killed the animal and then fatally shot the angry owner who confronted him with a knife, state police said Thursday.

The incident happened Wednesday night in Hillsdale County’s Reading Township after the deputy responded to a call about a dog on the loose.

READ MORE: AAA: Michigan's Average Gas Prices Rise To $2.95

“When the deputy made contact at the residence of the dog, the deputy was immediately attacked by the dog and bit,” state police said in a written statement. “The deputy fired shots at the dog, which resulted in killing the dog.”

READ MORE: Advocates Call On Sen. Gary Peters To Schedule Hearing For Washington, D.C. Statehood Bill

The deputy also shot the dog’s owner, Oscar Herrera, after he confronted the deputy with a knife, state police said.

The deputy, whose name wasn’t released, was treated at a hospital for dog bites. State police detectives were assigned to investigate the shootings.

MORE NEWS: CDC Eviction Moratorium Expires Next Month, Help Available Now

The Hillsdale Daily News reported that Herrera was arrested in March after a complaint about him firing shots into the woods near his home and yelling.