1Do not sacrifice to the LORD your God an ox or a sheep that has any defect or flaw in it, for that is detestable to the LORD your God.
2If a man or woman living among you in one of the towns the LORD gives you is found to have done evil in the eyes of the LORD your God in violation of his covenant,
3and they have gone to worship other gods and bowed down to them — to the sun or the moon or any of the stars in the sky — which I have forbidden —
4and if you are informed and after you carefully investigate it turns out to be true that this detestable thing has been done in Israel,
5take the man or woman who has done this evil deed to your city gate and stone them to death.
6On the testimony of two or three witnesses a person is to be put to death, but no one may be put to death on the testimony of only one witness.
7The witnesses must be the first to put them to death, and then all the people are to follow. You must purge the evil from among you.
8If cases come before your courts that are too difficult for you to judge — whether bloodshed, lawsuits, or assaults — take them to the place the LORD your God will choose.
9Go to the Levitical priests and to the judge who is in office at that time. Inquire of them and they will give you the verdict.
10You must act according to the decisions they give you at the place the LORD will choose. Be careful to do everything they instruct you.
11Act according to whatever they teach you and the decisions they give you. Do not turn aside from what they tell you, to the right or the left.
12Anyone who shows contempt for the judge or for the priest who stands ministering there to the LORD your God is to be put to death. You must purge the evil from Israel.
13All the people will hear and be afraid and will not be contemptuous again.
14When you enter the land the LORD your God is giving you and take possession of it and settle in it, and you say, 'Let us set a king over us like all the nations around us,'
15be sure to appoint over you a king the LORD your God chooses. He must be from among your fellow Israelites. Do not place a foreigner over you — someone who is not an Israelite.
16The king must not acquire many horses for himself or make the people return to Egypt to get more horses, for the LORD has told you, 'You are never to go back that way again.'
17He must not take many wives, or his heart will be led astray. He must not accumulate large amounts of silver and gold.
18When he takes the throne, he is to write for himself on a scroll a copy of this law, taken from the scroll of the Levitical priests.
19It is to remain with him, and he is to read it all the days of his life so that he may learn to revere the LORD his God and follow carefully all the words of this law and these statutes,
20and not consider himself better than his fellow Israelites, and not turn from the law to the right or the left. Then he and his descendants will reign long over his kingdom in Israel.