Deuteronomy 17:2-7

VIN(i) 2 If there is any man or woman among you, in any of the towns which the Lord your God gives you, who does evil in the eyes of the Lord your God, sinning against his agreement, 3 By becoming a servant of other gods and worshipping them or the sun or the moon or all the stars of heaven, against my orders; 4 »If it is told you and you have heard of it, then you shall inquire thoroughly. If it is true and the thing certain that this detestable thing has been done in Israel, 5 "Bring that man or woman who has done this evil deed out to your gates. Stone the man or the woman to death. 6 On the testimony of two or three witnesses the guilty person shall be put to death; but shall not be put to death on the testimony of one witness. 7 The hands of the witnesses will be the first to put him to death, and after them the hands of all the people. So you are to put away the evil from among you.