It is a defence to a prosecution for an offence against section 193 , 194 or 195 for the defendant to prove—
(a) the dog attacked, or acted in a way that caused fear to, the other person (the
"complainant" ) or the animal—(i) as a result of the dog being attacked, mistreated, provoked or teased by the complainant or the animal; or(ii) to protect the defendant, or a person accompanying the defendant (the
"accompanying person" ), or the defendant’s or accompanying person’s property; or
(b) for an attack on an animal, the dog was engaged in hunting the animal on private property when the offence happened; or
(c) for an attack on stock, the dog is a working dog and the offence happened when the stock were being worked; or
(d) the dog is a government entity dog and when the offence happened the defendant was acting within the scope of employment by the government entity; or
(e) when the offence happened, the dog was a security patrol dog carrying out that function under the Security Providers Act 1993 .