“You shall not sacrifice to the LORD, your God, from the herd or from the flock an animal with any serious defect; that would be an abomination to the LORD, your God.
“If there is found among you, in any one of the communities which the LORD, your God, gives you, a man or a woman who does evil in the sight of the LORD, your God, and transgresses his covenant,
by serving other gods, or by worshiping the sun or the moon or any of the host of the sky, against my command;
and if, on being informed of it, you find by careful investigation that it is true and an established fact that this abomination has been committed in Israel:
1 you shall bring the man (or woman) who has done the evil deed out to your city gates and stone him to death.
The testimony of two or three witnesses is required for putting a person to death; no one shall be put to death on the testimony of only one witness.
At the execution, the witnesses are to be the first to raise their hands against him; afterward all the people are to join in. Thus shall you purge the evil from your midst.
“If in your own community there is a case at issue which proves too complicated for you to decide, in a matter of bloodshed or of civil rights or of personal injury, you shall then go up to the place which the LORD, your God, chooses,
to the levitical priests or to the judge who is in office at that time. They shall study the case and then hand down to you their decision.
According to this decision that they give you in the place which the LORD chooses, you shall act, being careful to do exactly as they direct.
You shall carry out the directions they give you and the verdict they pronounce for you, without turning aside to the right or to the left from the decision they hand down to you.
2 Any man who has the insolence to refuse to listen to the priest who officiates there in the ministry of the LORD, your God, or to the judge, shall die. Thus shall you purge the evil from your midst.
And all the people, on hearing of it, shall fear, and never again be so insolent.
“When you have come into the land which the LORD, your God, is giving you, and have occupied it and settled in it, should you then decide to have a king over you like all the surrounding nations,
you shall set that man over you as your king whom the LORD, your God, chooses. He whom you set over you as king must be your kinsman; a foreigner, who is no kin of yours, you may not set over you.
3 But he shall not have a great number of horses; nor shall he make his people go back again to Egypt to acquire them, against the LORD’S warning that you must never go back that way again.
Neither shall he have a great number of wives, lest his heart be estranged, nor shall he accumulate a vast amount of silver and gold.
When he is enthroned in his kingdom, he shall have a copy of this law made from the scroll that is in the custody of the levitical priests.
He shall keep it with him and read it all the days of his life that he may learn to fear the LORD, his God, and to heed and fulfill all the words of this law and these statutes.
Let him not become estranged from his countrymen through pride, nor turn aside to the right or to the left from these commandments. Then he and his descendants will enjoy a long reign in Israel.
1  Out to your city gates: outside the gates in an unclean place; cf ⇒ Lev 24:14; ⇒ Numbers 15:36; ⇒ Acts 7:58; ⇒ Hebrews 13:12.
2  The priest: the high priest; the judge: a layman. The former presided over the court in cases which directly concerned religion, the latter in cases of a more secular nature; cf ⇒ 2 Chron 19:8-11.
3  Horses: chariotry for war. The LORD’S warning: the same warning is also referred to in ⇒ Deut 28:68, although it is not mentioned explicitly elsewhere in the Pentateuch. We know from other sources that Egypt used to export war horses to Palestine. The danger envisioned here is that some king might make Israel a vassal of Egypt for the sake of such military aid.