You are to appoint judges and officials for your tribes in every town that the LORD your God is giving you. They are to judge the people with righteous judgment.
18. Judges and officers shalt thou make. I have placed this passage among the Supplements of the Fifth Commandment, for, if it pleases God that judges should be appointed for ruling the people, it follows that their laws and edicts should be obeyed; and thus the parental authority extends also to them.
Here is, I. Care taken for the due administration of justice among them, that controversies might be determined, matters in variance adjusted, the injured redressed, and the injurious punished. While they were encamped in the wilderness, they had judges and officers according to their numbers, rulers of thousands and hundreds, Exo 18:25.
Commenting on Deuteronomy 16:18-22
Thou shall not wrest judgment,.... Or pervert it, pass a wrong sentence, or act contrary to justice; this is said to the judges as a direction to them, and so what follows: thou shalt not respect persons; so as to give the cause on account of outward circumstances and relations; as in favour of a rich man against a poor man merely for that reason...