2If a man or woman among you in one of the towns that the LORD your God gives you is found doing evil in the sight of the LORD your God by transgressing His covenant
3and going to worship other gods, bowing down to them or to the sun or moon or any of the host of heaven — which I have forbidden —
4and if it is reported and you hear about it, you must investigate it thoroughly. If the report is true and such an abomination has happened in Israel,
5you must bring out to your gates the man or woman who has done this evil thing, and you must stone that person to death.
— Deuteronomy 17:2-5