Deuteronomy 25:1-2

Thomson(i) 1 When a controversy happeneth between men, and they have come to a trial, and the trial is over, and the righteous is acquitted, and the criminal known; 2 in case the criminal deserve to be beaten, thou shalt make him lie down, before the judges; and they shall cause him to be beaten, in their presence, according to his wickedness.