171 " You shall not sacrifice to the Lord your God an ox or a sheep which has a blemish or any defect , for that is a detestable thing to the Lord your God . 2 " If there is found in your midst , in any of your towns , which the Lord your God is giving you, a man or a woman who does what is evil in the sight of the Lord your God , by transgressing 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 , which I have not commanded , 4 and if it is told you and you have heard of it, then you shall inquire thoroughly . Behold , if it is true and the thing certain that this detestable thing has been done in Israel , 5 then you shall bring out that man or that woman who has done this evil deed to your gates , that is, the man or the woman , and you shall stone them to death . 6 " On the evidence of two witnesses or three witnesses , he who is to die shall be put to death ; he shall not be put to death on the evidence of one witness . 7 " The hand of the witnesses shall be first against him to put him to death , and afterward the hand of all the people . So you shall purge the evil from your midst .

Matthew Henry's Commentary on Deuteronomy 17:1-7

Commentary on Deuteronomy 17:1-7

(Read Deuteronomy 17:1-7)

No creature which had any blemish was to be offered in sacrifice to God. We are thus called to remember the perfect, pure, and spotless sacrifice of Christ, and reminded to serve God with the best of our abilities, time, and possession, or our pretended obedience will be hateful to him. So great a punishment as death, so remarkable a death as stoning, must be inflicted on the Jewish idolater. Let all who in our day set up idols in their hearts, remember how God punished this crime in Israel.