Deuteronomy 25:2 in the King James Version
And it shall be, if the wicked man be worthy to be beaten, that the judge shall cause him to lie down, and to be beaten before his face, according to his fault, by a certain number.
Context
1 If there is a controversy between men, and they come to judgment and the judges judge them, then they shall justify the righteous and condemn the wicked.
2 It shall be, if the wicked man is worthy to be beaten, that the judge shall cause him to lie down and to be beaten before his face, according to his wickedness, by number.
3 He may sentence him to no more than forty stripes. He shall not give more, lest if he should give more and beat him more than that many stripes, then your brother will be degraded in your sight.