A dairy worker has been handed what is believed to be New Zealand's longest-ever prison sentence for animal cruelty, after cows were beaten, had their tails broken and were shot in the kneecaps on a farm he managed.

Michael James Whitelock was sentenced in the Greymouth District Court on Wednesday to four and a half years jail and banned from owning animals for 10 years.

Michael James Whitelock was sentenced to four and half years jail for animal cruelty. Credit:Stuff.co.nz

He had earlier pleaded guilty to 12 charges, including ill treatment of animals, unlawful possession of firearms and attempting to pervert the course of justice.

The Ministry for Primary Industries (MPI) welcomed the sentence.