Deuteronomy 17:3-7
Deuteronomy 17:3
and that person has gone and served other gods and worshiped them, or the sun, the moon, or any of the heavenly lights, which I have commanded not to do,
Deuteronomy 17:4
and if it is reported to you and you have heard about it, then you shall investigate thoroughly. And if it is true and the report is trustworthy that this detestable thing has been done in Israel,
Deuteronomy 17:5
then you are to bring out to your gates that man or woman who has done this evil deed, that is, the man or the woman, and you shall stone them to death.
Deuteronomy 17:6
On the testimony of two witnesses or three witnesses, the condemned shall be put to death; he shall not be put to death on the testimony of only one witness.
Deuteronomy 17:7
The hands of the witnesses shall be first against him to put him to death, and afterward the hands of all the people. So you shall eliminate the evil from your midst.