Deuteronomy 25:1-2

JPS_ASV_Byz(i) 1 If there be a controversy between men, and they come unto judgment, and the judges judge them, by justifying the righteous, and condemning the wicked, 2 then it shall be, if the wicked man deserve to be beaten, that the judge shall cause him to lie down, and to be beaten before his face, according to the measure of his wickedness, by number.