Deuteronomy 17:
If there be found among you, within any of thy gates which the LORD thy God giveth thee, man or woman, that hath wrought wickedness in the sight of the LORD thy God, in transgressing his covenant; 17:3 And hath gone and served other gods, and worshipped them, either the sun, or moon, or any of the host of heaven, which I have not commanded; 17:4 And it be told thee, and thou hast heard of it, and enquired diligently, and, behold, it be true, and the thing certain, that such abomination is wrought in Israel; 17:5 Then shalt thou bring forth that man or that woman, which have committed that wicked thing, unto thy gates, even that man or that woman, and shalt stone them with stones, till they die.
Deuteronomy 13:
6 If your very own brother, or your son or daughter, or the wife you love, or your closest friend secretly entices you, saying, “Let us go and worship other gods” (gods that neither you nor your ancestors have known, 7 gods of the peoples around you, whether near or far, from one end of the land to the other), 8 do not yield to them or listen to them. Show them no pity. Do not spare them or shield them. 9 You must certainly put them to death. Your hand must be the first in putting them to death, and then the hands of all the people. 10 Stone them to death, because they tried to turn you away from the Lord your God, who brought you out of Egypt, out of the land of slavery. 11 Then all Israel will hear and be afraid, and no one among you will do such an evil thing again.
12 If you hear it said about one of the towns the Lord your God is giving you to live in 13 that troublemakers have arisen among you and have led the people of their town astray, saying, “Let us go and worship other gods” (gods you have not known), 14 then you must inquire, probe and investigate it thoroughly. And if it is true and it has been proved that this detestable thing has been done among you, 15 you must certainly put to the sword all who live in that town. You must destroy it completely, both its people and its livestock. 16 You are to gather all the plunder of the town into the middle of the public square and completely burn the town and all its plunder as a whole burnt offering to the Lord your God. That town is to remain a ruin forever, never to be rebuilt.