Deuteronomy 25:2

New American Standard Bible (NASB)
then it shall be if the wicked man [c]deserves to be beaten, the judge shall then make him lie down and be beaten in his presence with the number of stripes according to his [d]guilt.

Read Deuteronomy 25:2 in other translations