6 But never put a person to death on the testimony of only one witness. There must always be two or three witnesses. 7 The witnesses must throw the first stones, and then all the people may join in. In this way, you will purge the evil from among you.

8 "Suppose a case arises in a local court that is too hard for you to decide-for instance, whether someone is guilty of murder or only of manslaughter, or a difficult lawsuit, or a case involving different kinds of assault. Take such legal cases to the place the Lord your God will choose, 9 and present them to the Levitical priests or the judge on duty at that time. They will hear the case and declare the verdict. 10 You must carry out the verdict they announce and the sentence they prescribe at the place the Lord chooses. You must do exactly what they say. 11 After they have interpreted the law and declared their verdict, the sentence they impose must be fully executed; do not modify it in any way. 12 Anyone arrogant enough to reject the verdict of the judge or of the priest who represents the Lord your God must die. In this way you will purge the evil 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.