Deuteronomy 25:2

Amplified Bible (AMP)
then it shall be that if the guilty man deserves to be beaten, the judge shall make him lie down and be beaten in his presence with a [certain] number of stripes in proportion to his offense.

Read Deuteronomy 25:2 in other translations