"I adjure thee, beetles, who dissipate and destroy the food of men in this place, that you should depart henceforth and go where you can harm nobody."
from the text of a manual of exorcism circa 1500
In 1545 the good people of Saint-Julian-de-Maurienne sued a plague of flies for destroying their vineyard. The court ruled that it was 'unbecoming to proceed with rashness and precipitance against the animals'. Thirty years later when the insects returned and the harvest was again lost the court accepted a formal complaint against the insects. It appointed Antoine Filliol, a distinguished lawyer to conduct the defence. He argued that the plaintiffs were acting unjustly, since his clients - like all living things - were commanded by God to 'be fruitful and multiply.'
The plaintiffs acknowledged the insects rights and agreed to set aside a piece of land outside the vineyard for the purpose of feeding and multiplying. We don't know if this was successful or not as the papers recording the outcome were lost, apparently destroyed by insects.
I found this story along with one about a pig hanged for murder in 'Strange Histories' by Darren Oldridge.