If, in the land that the Lord your God is giving you to possess, a body is found lying in open country, and it is not known who struck the person down,
then your elders and your judges shall come out to measure the distances to the towns that are near the body.
The elders of the town nearest the body shall take a heifer that has never been worked, one that has not pulled in the yoke;
the elders of that town shall bring the heifer down to a wadi with running water, which is neither plowed nor sown, and shall break the heifer's neck there in the wadi.
Then the priests, the sons of Levi, shall come forward, for the Lord your God has chosen them to minister to him and to pronounce blessings in the name of the Lord, and by their decision all cases of dispute and assault shall be settled.
All the elders of that town nearest the body shall wash their hands over the heifer whose neck was broken in the wadi,
and they shall declare: "Our hands did not shed this blood, nor were we witnesses to it.
Absolve, O Lord, your people Israel, whom you redeemed; do not let the guilt of innocent blood remain in the midst of your people Israel." Then they will be absolved of bloodguilt.
So you shall purge the guilt of innocent blood from your midst, because you must do what is right in the sight of the Lord.
When you go out to war against your enemies, and the Lord your God hands them over to you and you take them captive,
suppose you see among the captives a beautiful woman whom you desire and want to marry,
and so you bring her home to your house: she shall shave her head, pare her nails,
discard her captive's garb, and shall remain in your house a full month, mourning for her father and mother; after that you may go in to her and be her husband, and she shall be your wife.
But if you are not satisfied with her, you shall let her go free and not sell her for money. You must not treat her as a slave, since you have dishonored her.
If a man has two wives, one of them loved and the other disliked, and if both the loved and the disliked have borne him sons, the firstborn being the son of the one who is disliked,
then on the day when he wills his possessions to his sons, he is not permitted to treat the son of the loved as the firstborn in preference to the son of the disliked, who is the firstborn.
He must acknowledge as firstborn the son of the one who is disliked, giving him a double portion of all that he has; since he is the first issue of his virility, the right of the firstborn is his.
References for Deuteronomy 21:17
If someone has a stubborn and rebellious son who will not obey his father and mother, who does not heed them when they discipline him,
then his father and his mother shall take hold of him and bring him out to the elders of his town at the gate of that place.
They shall say to the elders of his town, "This son of ours is stubborn and rebellious. He will not obey us. He is a glutton and a drunkard."
Then all the men of the town shall stone him to death. So you shall purge the evil from your midst; and all Israel will hear, and be afraid.
When someone is convicted of a crime punishable by death and is executed, and you hang him on a tree,
his corpse must not remain all night upon the tree; you shall bury him that same day, for anyone hung on a tree is under God's curse. You must not defile the land that the Lord your God is giving you for possession.