1 Do not sacrifice to the LORD your God an ox or a sheep with a blemish or any flaw, because that is detestable to the LORD your God.
2 Suppose there is found among you, in one of the towns the LORD your God is giving you, a man or woman doing what is evil in the sight of the LORD your God, breaking his covenant,
3 who has gone off to serve other gods and bow down to them, or to the sun or the moon or any of the host of heaven, which I did not command,
4 and you are told of it and hear about it. Then make a thorough inquiry, and if it turns out to be true and certain that this detestable thing has been done in Israel,
5 bring the man or woman who did this evil deed out to your gates, that man or that woman, and stone the person to death with stones.
6 The one who is to die is to be put to death on the word of two or three witnesses; no one is to be put to death on the word of a single witness.
7 The witnesses' hands are to be the first against him to put him to death, and after that the hands of all the people. In this way you will purge the evil from your midst.
8 If a case comes up within your gates that is too hard for you to decide, between blood and blood, between claim and claim, or between stroke and stroke, matters in dispute, then get up and go to the place the LORD your God will choose.
9 Go to the Levitical priests and to the judge who serves at that time. Inquire of them, and they will announce to you the decision in the case.
10 Act in keeping with the word they announce to you from the place the LORD will choose, and be careful to do everything they instruct you.
11 Do what the instruction they give you says and follow the ruling they declare to you. Do not swerve from the sentence they announce to you, either to the right or to the left.
12 Anyone who acts arrogantly and will not listen to the priest who stands to serve the LORD your God there, or to the judge, that man must die. In this way you will purge the evil from Israel.
13 All the people will hear of it and be afraid, and they will not act arrogantly again.
14 When you enter the land the LORD your God is giving you and have taken possession of it and settled in it, and you say, "Let me set a king over me like all the nations around me,"
15 you may indeed set over yourself a king, the one the LORD your God chooses. He must be one of your own brothers; you may not place a foreigner over you, one who is not your brother.
16 But he must not acquire many horses for himself, nor send the people back to Egypt to get more horses, for the LORD has told you, "You must never go back that way again."
17 He must not take many wives for himself, or his heart will turn away; and he must not pile up great amounts of silver and gold for himself.
18 When he takes his seat on his royal throne, he is to write out for himself in a book a copy of this law, taken from the one in the keeping of the Levitical priests.
19 It is to remain with him, and he is to read from it every day of his life, so that he learns to fear the LORD his God and to keep all the words of this law and these statutes by carrying them out.
20 Then his heart will not be raised above his brothers, and he will not stray from the commandment to the right or the left, and he and his sons will reign long over his kingdom in Israel.