Deuteronomy 17:1-20
17 “You must not sacrifice to Jehovah your God a bull or a sheep that has a defect or anything wrong with it, for it would be detestable to Jehovah your God.+
2 “Suppose a man or a woman is found among you, in any of your cities that Jehovah your God is giving you, who is practicing what is bad in the eyes of Jehovah your God and violating his covenant,+
3 and he goes astray and worships other gods and he bows down to them or to the sun or the moon or all the army of the heavens,+ a thing that I have not commanded.+
4 When it is reported to you or you hear about it, then you should investigate the matter thoroughly. If it is confirmed to be true+ that this detestable thing has been done in Israel,
5 you must bring the man or the woman who has done this evil thing out to the city gates, and the man or the woman must be stoned to death.+
6 On the testimony* of two witnesses or of three witnesses+ the one who is to die should be put to death. He must not be put to death on the testimony of one witness.+
7 The hand of the witnesses should be the first to come against him to put him to death, and the hand of all the people afterward. You must remove what is bad from your midst.+
8 “If a case arises in one of your cities that is too difficult for you to judge, whether it is a case involving bloodshed+ or a legal claim that has been raised or a violent deed that has been committed or other matters of dispute, you should rise up and go to the place that Jehovah your God chooses.+
9 Go to the Levitical priests and to the judge+ serving in those days, and make your inquiry, and they will hand down the decision to you.+
10 Then you must act according to the decision that they hand down to you from the place that Jehovah chooses. Be careful to do according to all that they instruct you.
11 You must act according to the law that they show you and according to the decision that they declare to you.+ Do not deviate from the decision that they will hand down to you, either to the right or to the left.+
12 The man who acts presumptuously by not listening to the priest who is ministering to Jehovah your God or to the judge must die.+ You must remove what is bad from Israel.+
13 All the people will then hear and become afraid, and they will not act presumptuously anymore.+
14 “When you enter the land that Jehovah your God is giving you and you have taken possession of it and are living in it, and you say, ‘Let me appoint a king over myself like all the nations around me,’+
15 in that case, you should without fail appoint a king whom Jehovah your God chooses.+ You should appoint a king from among your brothers. You are forbidden to appoint over yourself a foreigner who is not your brother.
16 However, he should not acquire many horses for himself+ or make the people go back to Egypt in order to obtain more horses,+ since Jehovah told you, ‘You must never go back again by this way.’
17 Neither should he take many wives for himself, so that his heart may not go astray;+ nor should he acquire vast amounts of silver and gold for himself.+
18 When he takes his seat on the throne of his kingdom, he must write for himself in a book* a copy of this Law, taken from the one kept by the Levitical priests.+
19 “It is to remain with him, and he must read from it all the days of his life,+ so that he may learn to fear Jehovah his God and observe all the words of this Law and these regulations by carrying them out.+
20 Thus his heart will not exalt itself above his brothers, and he will not deviate from the commandment, either to the right or to the left, so that he may remain a long time over his kingdom, he and his sons in the midst of Israel.