Deuteronomy 17:2-5

2 aIf there is found among you, within any of your towns that the Lord your God is giving you, a man or woman who does what is evil in the sight of the Lord your God, bin transgressing his covenant, 3and has gone and served other gods and worshiped them, or cthe sun or the moon or any of the host of heaven, dwhich I have forbidden, 4and it is told you and you hear of it, then you shall inquire ediligently, and if it is true and certain that such an abomination has been done in Israel, 5then you shall bring out to your gates that man or woman who has done this evil thing, and you fshall stone that man or woman to death with stones.
Copyright information for ESV