The US Code defines sodomy as:
"Any person ... who engages in unnatural carnal copulation with another person of the same or opposite sex or with an animal is guilty of sodomy. Penetration, however slight, is sufficient to complete the offense."
Most countries outlaw bestiality but homosexual activity is gradually being decriminalized.
Historically, the law dealt harshly with sodomy. The Visigothic Code provided:
"The doctrine of the orthodox faith requires us to place our censure upon vicious practices, and to restrain those who are addicted to carnal offences. For we counsel well for the benefit of our people and our country, when we take measures to utterly extirpate the crimes of wicked men, and put an end to the evil deeds of vice.
"For this reason we shall attempt to abolish the horrible crime of sodomy, which is as contrary to Divine precept as it is to chastity. And although the authority of the Holy Scriptures, and the censure of earthly laws, alike, prohibit offences of this kind, it is nevertheless necessary to condemn them by a new decree; lest if timely correction be deferred, still greater vices may arise.
"Therefore, we establish by this law, that if any man whosoever, of any age, or race, whether he belongs to the clergy, or to the laity, should be convicted, by competent evidence, of the commission of the crime of sodomy, he shall, by order of the king, or of any judge ... suffer emasculation (castration)."