From 824 to 1845, in Europe, animals did not get off scot-free when they violated the laws of man... Just like common criminals, they too could be arrested and jailed (animal and criminals would incarcerated in the same prison), accused of wrongdoing, and have to stand trial. The court would appoint them a lawyers, who would represent them and defend them at a trial. A few lawyers became famous for their animal defenses.The source is E.P. Evans, The Criminal Prosecution and Capital Punishment of Animals (1906). Now, Gazzaniga recounts this all to argue that "our species has had a hard time drawing the line between" humans and other animals—that we're frequently in the habit of ascribing agency to other species. But this long review of Evans's book offers a very different read of the medieval animal courts: "Goring oxen were not to be executed because they were morally guilty, but because, as lower animals who had killed higher animals, they threatened to turn upside down the divinely-ordained hierarchy of God's creation." That seems more likely, no?
The accused animal, if found guilty, would then be punished. The punishment would often be retributive in nature, so that whatever the animal had done would be done to it. In the case of a particular pig (during those times pigs ran freely through towns, and were rather aggressive) that had attacked the face and pulled the arms off a small child, the punishment was the pig had its face mangled and its forelegs cut off, and then was hanged. Animals were punished because they were harmful. However, sometimes if the animal was valuable, such as an ox or horse, its sentence would be ameliorated, or perhaps the animal would be given to the church. If the animal had been found guilty of "buggery" (sodomy) both it and the buggerer were put to death. If domestic animals had caused damages and were found guilty, their owners would be fined for not controlling them.
There seems to have been some ambivalence as to whether an animal was fully responsible or whether its owner should be also considered responsible. Because animals were peers in judicial proceedings with humans, it was considered improper to eat the bodies of any animals that were capitally punished (except for the thrifty Flemish, who would enjoy a good steak after a cow was hanged).
Animals could also be tortured for confessions. If they didn't confess—and no one supposed they would—then their sentence could be lessened. You see, it was important to follow the law exactly, for if humans were tortured and didn't confess, then their sentence could also be changed. Many different types of domestic animals had their day in court: horses for throwing riders or causing carts to tip, dogs for biting, bulls for stampeding and injuring or goring someone, and pigs most commonly of all. These trials were held in civil courts.