It is unlawful for a person to wilfully or maliciously torture, mutilate, injure, disable, poison, or kill a dog or horse used by a law enforcement department or agency in the performance of the functions or duties of the department or when a dog is placed in a kennel off duty or a horse is placed in a stable off duty. However, a police officer or veterinarian may perform euthanasia in emergency situations when delay would cause the dog or horse undue suffering and pain.