Deuteronomy 16:18-21:9 (Listen)
18 “You shall appoint judges and officers in all your towns that the Lord your God is giving you, according to your tribes, and they shall judge the people with righteous judgment. 19 You shall not pervert justice. You shall not show partiality, and you shall not accept a bribe, for a bribe blinds the eyes of the wise and subverts the cause of the righteous. 20 Justice, and only justice, you shall follow, that you may live and inherit the land that the Lord your God is giving you.
Forbidden Forms of Worship
21 “You shall not plant any tree as an Asherah beside the altar of the Lord your God that you shall make. 22 And you shall not set up a pillar, which the Lord your God hates.
17:1 “You shall not sacrifice to the Lord your God an ox or a sheep in which is a blemish, any defect whatever, for that is an abomination to the Lord your God.
2 “If there is found among you, within any of your towns that the Lord your God is giving you, a man or woman who does what is evil in the sight of the Lord your God, in transgressing his covenant, 3 and has gone and served other gods and worshiped them, or the sun or the moon or any of the host of heaven, which I have forbidden, 4 and it is told you and you hear of it, then you shall inquire diligently, and if it is true and certain that such an abomination has been done in Israel, 5 then you shall bring out to your gates that man or woman who has done this evil thing, and you shall stone that man or woman to death with stones. 6 On the evidence of two witnesses or of three witnesses the one who is to die shall be put to death; a person shall not be put to death on the evidence of one witness. 7 The hand of the witnesses shall be first against him to put him to death, and afterward the hand of all the people. So you shall purge  the evil  from your midst.
Legal Decisions by Priests and Judges
8 “If any case arises requiring decision between one kind of homicide and another, one kind of legal right and another, or one kind of assault and another, any case within your towns that is too difficult for you, then you shall arise and go up to the place that the Lord your God will choose. 9 And you shall come to the Levitical priests and to the judge who is in office in those days, and you shall consult them, and they shall declare to you the decision. 10 Then you shall do according to what they declare to you from that place that the Lord will choose. And you shall be careful to do according to all that they direct you. 11 According to the instructions that they give you, and according to the decision which they pronounce to you, you shall do. You shall not turn aside from the verdict that they declare to you, either to the right hand or to the left. 12 The man who acts presumptuously by not obeying the priest who stands to minister there before the Lord your God, or the judge, that man shall die. So you shall purge the evil from Israel. 13 And all the people shall hear and fear and not act presumptuously again.
Laws Concerning Israel's Kings
14 “When you come to the land that the Lord your God is giving you, and you possess it and dwell in it and then say, ‘I will set a king over me, like all the nations that are around me,’ 15 you may indeed set a king over you whom the Lord your God will choose. One from among your brothers you shall set as king over you. You may not put a foreigner over you, who is not your brother. 16 Only he must not acquire many horses for himself or cause the people to return to Egypt in order to acquire many horses, since the Lord has said to you, ‘You shall never return that way again.’ 17 And he shall not acquire many wives for himself, lest his heart turn away, nor shall he acquire for himself excessive silver and gold.
18 “And when he sits on the throne of his kingdom, he shall write for himself in a book a copy of this law, approved by  the Levitical priests. 19 And it shall be with him, and he shall read in it all the days of his life, that he may learn to fear the Lord his God by keeping all the words of this law and these statutes, and doing them, 20 that his heart may not be lifted up above his brothers, and that he may not turn aside from the commandment, either to the right hand or to the left, so that he may continue long in his kingdom, he and his children, in Israel.
Provision for Priests and Levites
18:1 “The Levitical priests, all the tribe of Levi, shall have no portion or inheritance with Israel. They shall eat the Lord's food offerings  as their  inheritance. 2 They shall have no inheritance among their brothers; the Lord is their inheritance, as he promised them. 3 And this shall be the priests' due from the people, from those offering a sacrifice, whether an ox or a sheep: they shall give to the priest the shoulder and the two cheeks and the stomach. 4 The firstfruits of your grain, of your wine and of your oil, and the first fleece of your sheep, you shall give him. 5 For the Lord your God has chosen him out of all your tribes to stand and minister in the name of the Lord, him and his sons for all time.
6 “And if a Levite comes from any of your towns out of all Israel, where he lives—and he may come when he desires —to the place that the Lord will choose, 7 and ministers in the name of the Lord his God, like all his fellow Levites who stand to minister there before the Lord, 8 then he may have equal portions to eat, besides what he receives from the sale of his patrimony. 
9 “When you come into the land that the Lord your God is giving you, you shall not learn to follow the abominable practices of those nations. 10 There shall not be found among you anyone who burns his son or his daughter as an offering,  anyone who practices divination or tells fortunes or interprets omens, or a sorcerer 11 or a charmer or a medium or a necromancer or one who inquires of the dead, 12 for whoever does these things is an abomination to the Lord. And because of these abominations the Lord your God is driving them out before you. 13 You shall be blameless before the Lord your God, 14 for these nations, which you are about to dispossess, listen to fortune-tellers and to diviners. But as for you, the Lord your God has not allowed you to do this.
A New Prophet like Moses
15 “The Lord your God will raise up for you a prophet like me from among you, from your brothers—it is to him you shall listen— 16 just as you desired of the Lord your God at Horeb on the day of the assembly, when you said, ‘Let me not hear again the voice of the Lord my God or see this great fire any more, lest I die.’ 17 And the Lord said to me, ‘They are right in what they have spoken. 18 I will raise up for them a prophet like you from among their brothers. And I will put my words in his mouth, and he shall speak to them all that I command him. 19 And whoever will not listen to my words that he shall speak in my name, I myself will require it of him. 20 But the prophet who presumes to speak a word in my name that I have not commanded him to speak, or  who speaks in the name of other gods, that same prophet shall die.’ 21 And if you say in your heart, ‘How may we know the word that the Lord has not spoken?’— 22 when a prophet speaks in the name of the Lord, if the word does not come to pass or come true, that is a word that the Lord has not spoken; the prophet has spoken it presumptuously. You need not be afraid of him.
Laws Concerning Cities of Refuge
19:1 “When the Lord your God cuts off the nations whose land the Lord your God is giving you, and you dispossess them and dwell in their cities and in their houses, 2 you shall set apart three cities for yourselves in the land that the Lord your God is giving you to possess. 3 You shall measure the distances  and divide into three parts the area of the land that the Lord your God gives you as a possession, so that any manslayer can flee to them.
4 “This is the provision for the manslayer, who by fleeing there may save his life. If anyone kills his neighbor unintentionally without having hated him in the past— 5 as when someone goes into the forest with his neighbor to cut wood, and his hand swings the axe to cut down a tree, and the head slips from the handle and strikes his neighbor so that he dies—he may flee to one of these cities and live, 6 lest the avenger of blood in hot anger pursue the manslayer and overtake him, because the way is long, and strike him fatally, though the man did not deserve to die, since he had not hated his neighbor in the past. 7 Therefore I command you, You shall set apart three cities. 8 And if the Lord your God enlarges your territory, as he has sworn to your fathers, and gives you all the land that he promised to give to your fathers— 9 provided you are careful to keep all this commandment, which I command you today, by loving the Lord your God and by walking ever in his ways—then you shall add three other cities to these three, 10 lest innocent blood be shed in your land that the Lord your God is giving you for an inheritance, and so the guilt of bloodshed be upon you.
11 “But if anyone hates his neighbor and lies in wait for him and attacks him and strikes him fatally so that he dies, and he flees into one of these cities, 12 then the elders of his city shall send and take him from there, and hand him over to the avenger of blood, so that he may die. 13 Your eye shall not pity him, but you shall purge the guilt of innocent blood  from Israel, so that it may be well with you.
14 “You shall not move your neighbor's landmark, which the men of old have set, in the inheritance that you will hold in the land that the Lord your God is giving you to possess.
Laws Concerning Witnesses
15 “A single witness shall not suffice against a person for any crime or for any wrong in connection with any offense that he has committed. Only on the evidence of two witnesses or of three witnesses shall a charge be established. 16 If a malicious witness arises to accuse a person of wrongdoing, 17 then both parties to the dispute shall appear before the Lord, before the priests and the judges who are in office in those days. 18 The judges shall inquire diligently, and if the witness is a false witness and has accused his brother falsely, 19 then you shall do to him as he had meant to do to his brother. So you shall purge the evil  from your midst. 20 And the rest shall hear and fear, and shall never again commit any such evil among you. 21 Your eye shall not pity. It shall be life for life, eye for eye, tooth for tooth, hand for hand, foot for foot.
Laws Concerning Warfare
20:1 “When you go out to war against your enemies, and see horses and chariots and an army larger than your own, you shall not be afraid of them, for the Lord your God is with you, who brought you up out of the land of Egypt. 2 And when you draw near to the battle, the priest shall come forward and speak to the people 3 and shall say to them, ‘Hear, O Israel, today you are drawing near for battle against your enemies: let not your heart faint. Do not fear or panic or be in dread of them, 4 for the Lord your God is he who goes with you to fight for you against your enemies, to give you the victory.’ 5 Then the officers shall speak to the people, saying, ‘Is there any man who has built a new house and has not dedicated it? Let him go back to his house, lest he die in the battle and another man dedicate it. 6 And is there any man who has planted a vineyard and has not enjoyed its fruit? Let him go back to his house, lest he die in the battle and another man enjoy its fruit. 7 And is there any man who has betrothed a wife and has not taken her? Let him go back to his house, lest he die in the battle and another man take her.’ 8 And the officers shall speak further to the people, and say, ‘Is there any man who is fearful and fainthearted? Let him go back to his house, lest he make the heart of his fellows melt like his own.’ 9 And when the officers have finished speaking to the people, then commanders shall be appointed at the head of the people.
10 “When you draw near to a city to fight against it, offer terms of peace to it. 11 And if it responds to you peaceably and it opens to you, then all the people who are found in it shall do forced labor for you and shall serve you. 12 But if it makes no peace with you, but makes war against you, then you shall besiege it. 13 And when the Lord your God gives it into your hand, you shall put all its males to the sword, 14 but the women and the little ones, the livestock, and everything else in the city, all its spoil, you shall take as plunder for yourselves. And you shall enjoy the spoil of your enemies, which the Lord your God has given you. 15 Thus you shall do to all the cities that are very far from you, which are not cities of the nations here. 16 But in the cities of these peoples that the Lord your God is giving you for an inheritance, you shall save alive nothing that breathes, 17 but you shall devote them to complete destruction,  the Hittites and the Amorites, the Canaanites and the Perizzites, the Hivites and the Jebusites, as the Lord your God has commanded, 18 that they may not teach you to do according to all their abominable practices that they have done for their gods, and so you sin against the Lord your God.
19 “When you besiege a city for a long time, making war against it in order to take it, you shall not destroy its trees by wielding an axe against them. You may eat from them, but you shall not cut them down. Are the trees in the field human, that they should be besieged by you? 20 Only the trees that you know are not trees for food you may destroy and cut down, that you may build siegeworks against the city that makes war with you, until it falls.
Atonement for Unsolved Murders
21:1 “If in the land that the Lord your God is giving you to possess someone is found slain, lying in the open country, and it is not known who killed him, 2 then your elders and your judges shall come out, and they shall measure the distance to the surrounding cities. 3 And the elders of the city that is nearest to the slain man shall take a heifer that has never been worked and that has not pulled in a yoke. 4 And the elders of that city shall bring the heifer down to a valley with running water, which is neither plowed nor sown, and shall break the heifer's neck there in the valley. 5 Then the priests, the sons of Levi, shall come forward, for the Lord your God has chosen them to minister to him and to bless in the name of the Lord, and by their word every dispute and every assault shall be settled. 6 And all the elders of that city nearest to the slain man shall wash their hands over the heifer whose neck was broken in the valley, 7 and they shall testify, ‘Our hands did not shed this blood, nor did our eyes see it shed. 8 Accept atonement, O Lord, for your people Israel, whom you have redeemed, and do not set the guilt of innocent blood in the midst of your people Israel, so that their blood guilt be atoned for.’ 9 So you shall purge the guilt of innocent blood from your midst, when you do what is right in the sight of the Lord. (ESV)
 17:7 Septuagint drive out; also verse 12
 17:7 Or evil person; also verse 12
 17:18 Hebrew from before
 18:1 Or the offerings by fire to the Lord
 18:1 Hebrew his
 18:6 Or lives—if he comes enthusiastically
 18:8 The meaning of the Hebrew is uncertain
 18:10 Hebrew makes his son or his daughter pass through the fire
 18:20 Or and
 19:3 Hebrew road
 19:13 Or the blood of the innocent
 19:19 Or evil person
 20:17 That is, set apart (devote) as an offering to the Lord (for destruction)