Deuteronomy 19:16-19

19:16 If a false witness testifies against another person and accuses him of a crime, 19:17 then both parties to the controversy must stand before the Lord, that is, before the priests and judges who will be in office in those days. 19:18 The judges will thoroughly investigate the matter, and if the witness should prove to be false and to have given false testimony against the accused, 19:19 you must do to him what he had intended to do to the accused. In this way you will purge evil from among you.