A pervert farrier, who filmed himself having sex with a cow before helping a miniature horse to penetrate him, has been jailed.

Richard McNair was working as a farrier at a local farm between October 1, 2016 and October 1, 2017, when he filmed himself having sex with a young female cow.

At some point between August 2017 and October 2017, he then allowed a miniature horse to have sex with him, the NZ Herald reported.

McNair, 50, from Waikato, New Zealand, also possessed more than 20,000 pornographic images featuring both children and animals.

He was jailed for three years five months, today, for bestiality and possessing and distributing child and bestiality pornography.

In an apology letter to Hamilton District Court, McNair explained he wouldn’t dream of afflicting abuse on a child.

But Judge Merelina Burnett did not accept any claims of good character and refused to accept the defendant’s apology.

She told him: ‘This begs the question as to whether you understand the nature and consequences of child pornography and the abuse of children.

‘Your conduct, by definition, has someone else abusing these children for you,’ Judge Burnett said.

McNair was arrested after police received a tip he was sharing and trading youthful pornography online.

The former farmer belonged to the worldwide child pornography sharing group Peer to Peer.

Over one week in June last year, investigators caught McNair sharing two videos and 317 images from his extensive porn collection online.

After searching McNair’s home police found more than 20,000 pornographic images, including 7554 sexual images of children as young as two.

Many of his personal items including a laptop, USB sticks, GoPro, cellphones and tablets have been confiscated and his excessive organisation of the material revealed by the New Zealand Police’s Online Child Exploitation unit (Oceanz).

The ex-farmer used labels such as child nudity, nudism, cartoon, fantasy and bestiality to categorise the content in his significant collection.

Counsel for the offender, Sheila Cameron, said McNair had a tough childhood, sexual abuse as a child claims, bullying and torment.

She said: ‘He struggles with adult relationships, he’s never had an intimate relationship, he lives in a form of extreme social isolation.’

Although he has undergone counselling since his arrest in October last year he was not able to return to work with the animals.

The offender was diagnosed with post traumatic stress disorder and avoidant personality disorder.