Deuteronomy 25:1-2

MSB(i) 1 If there is a dispute between men, they are to go to court to be judged, so that the innocent may be acquitted and the guilty condemned. 2 If the guilty man deserves to be beaten, the judge shall have him lie down and be flogged in his presence with the number of lashes his crime warrants.