Old Testament

Deuteronomy 17
171Do not sacrifice to the Lord your God any ox or sheep that has any kind of defect or serious flaw, because that is something detestable to the Lord your God.
2If there is found among you (within the gates of one of your cities that the Lord your God is giving you) a man or a woman who is doing something that is evil in the eyes of the Lord your God by transgressing his covenant, 3or a man or a woman who is going and serving other gods and bowing down to them or to the sun or to the moon or to any of the army of the heavens (something that I have not commanded), 4and you are told about it and you listen and investigate diligently, and it is established that the charge is true and that this abomination has been committed in Israel, 5then you are to bring that man or that woman who has committed this evil out to your city gate, and you are to stone that person to death, whether man or woman.
6A person is to be put to death on the basis of the testimony of two or three witnesses. No one is to be put to death based on the testimony of one witness. 7The hands of the witnesses are to be the first ones raised against him when putting him to death, and after that the hands of all the other people. In that way you are to purge the evil from among you.
8If a case is too difficult for you to make a decision, whether it involves a homicide, a lawsuit, or an assault, or any matters of controversy within the gates of your cities, then proceed by going up to the place that the Lord your God will choose. 9Go to the priests, who are from the tribe of Levi, and to the presiding judge at that time and lay out the case. They will declare the verdict to you. 10Then you are to act according to the verdict that they will declare to you from the place that the Lord will choose, and you are to be careful to carry out everything that they instruct you to do.
11Act according to the instructions they give you and according to the judgment that they speak to you. Do not turn to the right or to the left from the word that they declare to you.
12Any man who acts presumptuously by not listening to the priest, who presides and serves the Lord your God there, or by not listening to the judge, that man is condemned to die. In that way you will purge the evil from Israel. 13Then all the people will hear and fear and not act presumptuously anymore.
The King
14When you have entered the land that the Lord your God is giving you, and you have taken possession of it and settled in it, and you say, “I am determined to set a king over me, like all the nations that are around me,” 15you may set a king over yourself, one whom the Lord your God will choose. You may set over yourself a king who is from among your brother Israelites. You must not set a foreigner over you, one who is not your brother.
16But the king must not accumulate more and more horses for himself, and he must not send people back to Egypt in order to accumulate more horses, because the Lord has said to you, “You must not go back that way again.” 17He must not accumulate more and more wives for himself, or his heart may go astray. He must not accumulate excessive silver and gold for himself.
18When he sits on his royal throne, he is to have a copy of this law written for him on a scroll in the presence of the priests, who are from the tribe of Levi. 19It is to remain with him, and he is to read it all the days of his life so that he learns to fear the Lord his God by being careful to carry out all the words of this law and these statutes, 20so that his heart does not grow haughty toward his brothers and turn away from this set of commands, either to the right or to the left, so that the days of his royal reign in Israel, as well as that of his sons, may be many.