A dog was euthanized after a man fought the animal off with a knife while it tried to attack him in Spartanburg, South Carolina, on Wednesday morning.

Spartanburg police department responded to the area after receiving a call of a dog attack. Upon arrival, the unnamed man told police that he was walking down the street when a dog charged at him and bit him in the left leg. When the canine tried to attack him again, the victim stabbed the animal in its mouth and jaw, causing it to withdraw. A woman then rushed to the scene and took the dog away and tied it up. The responding officers spoke to the woman who said she was looking after her friend’s dog for two months as she couldn’t keep it in her apartment.

Police informed the unnamed woman she was legally responsible for the canine and that it would be considered dangerous for attacking the man. The woman was also given the option to surrender the animal for humane euthanasia. The woman then tried to get in touch with the dog’s owner several times but after failing to contact her, she decided to surrender the canine for euthanasia.

The dog was taken to the Spartanburg Humane Society where it was euthanized. No charges were filed in the case.

dog
In this image, a dog's paw reaches through the kennel fence at the Queen Anne's County Department of Animal Service in Queenstown, Maryland, Jan. 24, 2008. Getty Images/Jim Watson

In a similar incident in South Carolina’s Cherokee County in May, a dog was euthanized after it mauled a 61-year-old woman, seriously injuring her. Police responded to a home after receiving report of a dog attack. Upon arrival, he found a German shepherd standing over a woman in the yard of the home. When the canine charged at the officer, he fired several shots at the animal but did not kill it. While the injured woman was airlifted to a nearby hospital, the dog was taken away by animal control officers and euthanized because of the extent of injuries it sustained.