Deuteronomy.
Chapter 17.
“You do not sacrifice to your God YHWH ox or sheep in which there is a blemish—any bad thing; for it is an abomination to your God YHWH. 
When there is found in your midst, in one of your cities which your God YHWH is giving to you, a man or a woman who does evil in the eyes of your God YHWH by transgressing His covenant, 
and he goes and serves other gods, and bows himself to them, and to the sun, or to the moon, or to any of the host of the heavens, which I have not commanded, 
and it has been declared to you, and you have heard, and have searched diligently, and behold, if truth, the thing is established; this abomination has been done in Israel— 
then you have brought out that man or that woman who has done this evil thing, to your gates—the man or the woman—and you have stoned them with stones, and they have died. 
By the mouth of two witnesses or three witnesses is he who is being put to death put to death; he is not put to death by the mouth of one witness; 
the hand of the witnesses is on him in the first place to put him to death, and the hand of all the people last; and you have put away evil out of your midst. 
When anything is too hard for you for judgment, between blood and blood, between plea and plea, and between stroke and stroke—matters of strife within your gates—then you have risen and gone up to the place on which your God YHWH fixes, 
and have come to the priests, the Levites, and to the judge who is in those days, and have inquired, and they have declared the word of judgment to you, 
and you have done according to the tenor of the word which they declare to you (they of that place which YHWH chooses); and you have observed to do according to all that they direct you. 
According to the tenor of the law which they direct you, and according to the judgment which they say to you, you do; you do not turn aside from the word which they declare to you to the right or left. 
And the man who acts with presumption, so as not to listen to the priest (who is standing to serve your God YHWH there), or to the judge, even that man has died, and you have put away evil from Israel, 
and all the people hear and fear, and do not presume anymore. 
When you come into the land which your God YHWH is giving to you, and have possessed it, and dwelt in it, and you have said, Let me set a king over me like all the nations which are around me— 
you certainly set a king over you on whom YHWH fixes; you set a king over you from the midst of your brothers; you are not able to set a stranger over you, who is not your brother. 
Only, he does not multiply horses for himself, nor cause the people to return to Egypt, so as to multiply horses, seeing YHWH has said to you, You do not add to return in this way anymore. 
And he does not multiply wives for himself, and his heart does not turn aside, and he does not exceedingly multiply silver and gold for himself. 
And it has been, when he sits on the throne of his kingdom, that he has written a copy of this law for himself, on a scroll, from that before the priests, the Levites, 
and it has been with him, and he has read in it all the days of his life, so that he learns to fear his God YHWH, to keep all the words of this law and these statutes—to do them, 
so that his heart is not high above his brothers, and so as not to turn aside from the command to the right or left, so that he prolongs days over his kingdom, he and his sons in the midst of Israel.” 
