17You shall not sacrifice to the Lord your God an ox or a sheep that has any defect of a serious kind, for that is abhorrent to the Lord your God.
2If there is found among you, in one of the settlements that the Lord your God is giving you, a man or woman who has affronted the Lord your God and transgressed His covenant—3turning to the worship of other gods and bowing down to them, to the sun or the moon or any of the heavenly host, something I never commanded—4and you have been informed or have learned of it, then you shall make a thorough inquiry. If it is true, the fact is established, that abhorrent thing was perpetrated in Israel, 5you shall take the man or the woman who did that wicked thing out to the public place, and you shall stone them, man or woman, to death.—6A person shall be put to death only on the testimony of two or more witnesses; he must not be put to death on the testimony of a single witness.—7Let the hands of the witnesses be the first against him to put him to death, and the hands of the rest of the people thereafter. Thus you will sweep out evil from your midst.
8If a case is too baffling for you to decide, be it a controversy over homicide, civil law, or assault—matters of dispute in your courts—you shall promptly repair to the place that the Lord your God will have chosen, 9and appear before the levitical priests, or the magistrate in charge at the time, and present your problem. When they have announced to you the verdict in the case, 10you shall carry out the verdict that is announced to you from that place that the Lord chose, observing scrupulously all their instructions to you. 11You shall act in accordance with the instructions given you and the ruling handed down to you; you must not deviate from the verdict that they announce to you either to the right or to the left. 12Should a man act presumptuously and disregard the priest charged with serving there the Lord your God, or the magistrate, that man shall die. Thus you will sweep out evil from Israel- 13all the people will hear and be afraid and will not act presumptuously again.
14If, after you have entered the land that the Lord your God has assigned to you, and taken possession of it and settled in it, you decide, “I will set a king over me, as do all the nations about me,” 15you shall be free to set a king over yourself, one chosen by the Lord your God. Be sure to set as king over yourself one of your own people; you must not set a foreigner over you, one who is not your kinsman. 16Moreover, he shall not keep many horses or send people back to Egypt to add to his horses, since the Lord has warned you, “You must not go back that way again.” 17And he shall not have many wives, lest his heart go astray; nor shall he amass silver and gold to excess.
18When he is seated on his royal throne, he shall have a copy of this Teaching written for him on a scroll by the levitical priests. 19Let it remain with him and let him read in it all his life, so that he may learn to revere the Lord his God, to observe faithfully every word of this Teaching as well as these laws. 20Thus he will not act haughtily toward his fellows or deviate from the Instruction to the right or to the left, to the end that he and his descendants may reign long in the midst of Israel.
Tanakh, The Holy Scriptures, (Philadelphia, Jerusalem- Jewish Publication Society) 1985.