6 By the mouth of two witnesses or of three witnesses is he who is dead put to death; he is not put to death by the mouth of one witness; 7 the hand of the witnesses is on him, in the first place, to put him to death, and the hand of all the people last; and thou hast put away the evil thing out of thy midst.

8 'When anything is too hard for thee for judgment, between blood and blood, between plea and plea, and between stroke and stroke—matters of strife within thy gates—then thou hast risen, and gone up unto the place on which Jehovah thy God doth fix, 9 and hast come in unto the priests, the Levites, and unto the judge who is in those days, and hast inquired, and they have declared to thee the word of judgment, 10 and thou hast done according to the tenor of the word which they declare to thee ('they' of that place which Jehovah doth choose; and thou hast observed to do according to all that they direct thee. 11 'According to the tenor of the law which they direct thee, and according to the judgment which they say to thee thou dost do; thou dost not turn aside from the word which they declare to thee, right or left. 12 And the man who acteth with presumption, so as not to hearken unto the priest (who is standing to serve there Jehovah thy God), or unto the judge, even that man hath died, and thou hast put away the evil thing from Israel,

Matthew Henry's Commentary on Deuteronomy 17:6-12

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.

Commentary on Deuteronomy 17:8-13

(Read Deuteronomy 17:8-13)

Courts of judgment were to be set up in every city. Though their judgment had not the Divine authority of an oracle, it was the judgment of wise, prudent, experienced men, and had the advantage of a Divine promise.