Before he dies Moses reviews for the Israelites their system of justice, the rules of kingship, their relationship to idolatrous nations, and the rules of doing battle.
Deuteronomy 16:18 Appoint judges and officers for all your gates in your cities, which יהוה your Elohim gives you, tribe by tribe: and they will judge את־ the people with righteous judgment. C-MATS
Question: What kind of judges must be appointed? The mere appointment of persons to staff the courts is not sufficient; they must be qualified and righteous, so that they will judge honestly and correctly (Rashi). The court must treat everyone equally. If a judge shows more respect to one litigant (the person engaged in a lawsuit), the other feels at a disadvantage (Rashi). Chumash
Question: What life lesson can we learn from this law? The Torah says to appoint judges and officers at the gates of our cities to protect them and maintain justice. We can also learn from this to carefully guard what we allow to pass through the ‘gates’ of our bodies – our eyes, ears, etc. – and start to take control of what we allow to influence our precious hearts and minds. Whatever we allow ourselves to see, hear or otherwise let into our bodies and minds is going to have an effect on us and we should value ourselves enough to set up guards, our good judgment, to make sure whatever we don’t want in – stays out.
Deuteronomy 16:19 Do not pervert justice; you will not show favoritism or take a bribe (gift): for a gift blinds the eyes of the wise and perverts the words of the righteous. 20 Justice you will only follow, so that you may live and inherit את־ the land which יהוה your Elohim gives you. C-MATS
Question: What is the penalty for an unrighteous judge? יהוה is very harsh with a judge who knowingly tampers with justice because to deprive someone of his money unjustly can be a matter of life and death. The implication is that the judge who perverts justice will die. Chumash