6 But only on the testimony of two or three witnesses may a person be put to death. No one may be put to death on the testimony of one witness. 7 The witnesses must throw the first stones in the execution, then the rest of the community joins in. You have to purge the evil from your community.

8 When matters of justice come up that are too much for you - hard cases regarding homicides, legal disputes, fights - take them up to the central place of worship that God, your God, has designated. 9 Bring them to the Levitical priests and the judge who is in office at the time. Consult them and they will hand down the decision for you. 10 Then carry out their verdict at the place designated by God, your God. Do what they tell you, in exactly the way they tell you. 11 Follow their instructions precisely: Don't leave out anything; don't add anything. 12 Anyone who presumes to override or twist the decision handed down by the priest or judge who was acting in the Presence of God, your God, is as good as dead - root him out, rid Israel of the evil.

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.