MANTOLOKING — Officers shot dead a man who moments earlier had stabbed a police K9 and who'd slashed his own neck, police say.

Police located Edward M. Walsh, 39, of Manahawkin at a home on Barnegat Lane on Sunday, after he allegedly kidnapped his girlfriend and stole her car in Sayreville, according to the Ocean County Prosecutor's Office. From there, Walsh drove to Lacey before ending up at the Mantoloking home, the prosecutor said. The prosecutor's office said Walsh had previously been married to a family member of the home's prior owner.

When officers arrived, they entered the home, where they found Walsh holding a knife, the prosecutor's office said. Walsh refused to drop the knife, so police sicced the dog on him — but Walsh stabbed the dog before it could do anything, the prosecutor said.

Officers then shot at Walsh, who died at the scene, the prosecutor's office said. He was also found with a self-inflicted knife wound across his neck, the prosecutor's office said.

Kane was taken to the Red Bank Veterinary Hospital, where he is expected to make a full recovery and be released on Wednesday.

The prosecutor's office is encouraging anyone with information about the incident to call Detective Brant Uricks or Detective Lindsay Woodfield of the Major Crimes Unit at 732-929-2027.