Removal of the testicles. The act of gelding. When this act is maliciously performed upon a man, it is a mayhem and punishable as such, although the sufferer consented to it.
At various times, including today, it has been proposed as a punishment for various sexual offenses and was actually imposed though its constitutionality was uncertain at best.
By the ancient law of England this crime was punished by retaliation, membrum pro membro. It is punished in the United States generally by fine and imprisonment. The civil law punished it with death. The consequences of castration, when complete, are impotence and sterility.