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: Michigan State AD Beekman Steps Down, Takes On New Role At School

“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: Court Extends Intimidation Crime To Transgender Victims

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: Whitmer Declares State Of Emergency For White Lake, Armada Townships, The Village Of Armada

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.