Deuteronomy 17:2-6
2 “If there is discovered among you, within any of your cities, which the Lord your God is giving you, a man or a woman who does evil in the sight of the Lord your God, by transgressing (violating) His covenant,
3 and has gone and served other gods and worshiped them, or the sun or the moon or any of the heavenly host, [doing these things] which I have commanded not to do,
4 and if it is told to you and you hear about it, then you shall investigate thoroughly [all the charges]. If it is confirmed (a)beyond doubt that this detestable thing has been done in Israel,
5 then you shall bring that man or that woman who has done this evil thing to the gates [of your city] and you shall stone the man or the woman to death.
6 (b)On the evidence of two or three witnesses, he who is to die shall be put to death; he shall not be put to death on the evidence of [only] one witness.