Thou shalt not sacrifice to Jehovah thy God an ox or sheep wherein is a defect, or anything bad; for it is an abomination to Jehovah thy God.
References for Deuteronomy 17:1
If there be found in thy midst in any of thy gates which Jehovah thy God giveth thee, man or woman, that doeth what is evil in the sight of Jehovah thy God, in transgressing his covenant,
and goeth and serveth other gods, and boweth down to them, either to the sun or to the moon, or to the whole host of heaven, which I have not commanded;
and it be told thee, and thou hearest of it; then thou shalt make thorough inquiry, and if it be truth [and] the thing be certain, that this abomination hath been wrought in Israel,
References for Deuteronomy 17:4
thou shalt bring forth that man or that woman, who committed that wicked thing, unto thy gates, the man or the woman, and shalt stone them with stones, that they die.
At the mouth of two witnesses, or three witnesses, shall he that is to die be put to death: he shall not be put to death at the mouth of one witness.
The hands of the witnesses shall be first upon him to put him to death, and afterwards the hands of all the people; and thou shalt put evil away from thy midst.
If there arise a matter too hard for thee in judgment, between blood and blood, between cause and cause, and between stroke and stroke, matters of controversy within thy gates, then shalt thou arise, and go up to the place which Jehovah thy God will choose.
References for Deuteronomy 17:8
And thou shalt come unto the priests, the Levites, and unto the judge that shall be in those days, and inquire; and they shall declare unto thee the sentence of judgment;
and thou shalt do according to the tenor of the word, which they of that place which Jehovah will choose shall declare unto thee; and thou shalt take heed to do according to all that they instruct thee:
according to the sentence of the law which they shall declare unto thee, and according to the judgment which they shall tell thee, thou shalt do: thou shalt not decline from the word which they shall declare unto thee, to the right hand, or the left.
And the man that shall act presumptuously, and not hearken unto the priest that standeth to serve there before Jehovah thy God, or unto the judge, that man shall die; and thou shalt put away evil from Israel.
And all the people shall hear, and fear, and no more act presumptuously.
When thou comest unto the land which Jehovah thy God giveth thee, and shalt possess it, and shalt dwell therein, and shalt say, I will set a king over me, like all the nations that are about me;
thou shalt only set him king over thee whom Jehovah thy God will choose: from among thy brethren shalt thou set a king over thee; thou mayest not set a foreigner over thee, who is not thy brother.
Only he shall not multiply horses to himself, nor lead back the people to Egypt, to multiply horses; for Jehovah hath said unto you, Ye shall not return again any more that way.
Neither shall he multiply wives to himself, that his heart turn not away; neither shall he greatly multiply to himself silver and gold.
And it shall be, when he sitteth upon the throne of his kingdom, that he shall write for himself a copy of this law in a book out of that which is before the priests, the Levites;
and it shall be with him, and he shall read therein all the days of his life; that he may learn to fear Jehovah his God, to keep all the words of this law and these statutes, to do them;
that his heart be not lifted up above his brethren, and that he turn not aside from the commandment, to the right hand, or to the left; that he may prolong his days in his kingdom, he, and his sons, in the midst of Israel.