Suppose an ox or sheep has anything at all wrong with it. Then don't sacrifice it to the LORD your God. He hates it.
Someone who is living among you might do what is evil in the sight of the LORD your God. It might happen in one of the towns the LORD is giving you. That person is breaking the LORD's covenant.
The person might have worshiped or bowed down to other gods. That person might have bowed down to the sun or moon or stars in the sky. I have commanded you not to do those things.
When you hear that people have done something like that, check the matter out carefully. If it's true, an evil thing has been done in Israel. It's something the LORD hates.
So take the person who has done that evil thing to your city gate. Put that person to death with stones.
The witness of two or three people is required to put someone to death. No one can be put to death because of what only one witness says. It needs the witness of two or three people.
The witnesses must throw the first stones. Then the rest of the people must also throw stones. Get rid of that evil person.
People will bring their cases to your courts. But some cases will be too hard for you to judge. They might be about murders, attacks or other crimes. Then take those hard cases to the place the LORD your God will choose.
Go to a priest, who is a Levite. And go to the judge who is in office at that time. Ask them for their decision. They will give it to you.
They'll hand down their decisions at the place the LORD will choose. You must do what they decide. Be careful to do everything they direct you to do.
Act in keeping with the laws they teach you. Accept the decisions they give you. Don't turn away from what they tell you. Don't turn to the right or the left.
Someone might make fun of the judge. Or he might make fun of the priest who serves the LORD your God at the place he will choose. If the man does that, he must be put to death. Remove that evil person from Israel.
All of the people of Israel will hear about it. And they will be afraid to make fun of a judge or priest again.
You will enter the land the LORD your God is giving you. You will take it as your own. You will settle down in it. When you do, you will say, "Let's appoint a king over us, just like all of the nations around us."
When that happens, make sure you appoint over you the king the LORD your God chooses. He must be from among your own people. Don't appoint over you someone from another country. Don't choose anyone who isn't from one of the tribes of Israel.
The king must not get large numbers of horses for himself. He must not make the people return to Egypt to get more horses. The LORD has told you, "You must not go back there again."
The king must not have a lot of wives. If he does, he will be led down the wrong path. He must not store up large amounts of silver and gold.
When he sits on the throne of his kingdom, he must make himself a copy of the law I'm teaching you. He must write it on a scroll. He must copy it from the scroll of a priest, who is a Levite.
The king must keep the scroll close to him at all times. He must read it all the days of his life. Then he can learn to have respect for the LORD his God. He can carefully follow all of the words of that law and those rules.
He won't think of himself as being better than his people are. He won't turn away from the law. He won't turn to the right or the left. Then he and his sons after him will rule over his kingdom in Israel for a long time.