Deuteronomy 25:1-3

Deuteronomy 25:1-3 MSG

When men have a legal dispute, let them go to court; the judges will decide between them, declaring one innocent and the other guilty. If the guilty one deserves punishment, the judge will have him lay himself down before him and lashed as many times as his crime deserves, but not more than forty. If you hit him more than forty times, you will degrade him to something less than human.