Old Testament

Deuteronomy 21:15-17
Family Law
15If a man has two wives, and one is loved and one is not loved, and both the loved one and the unloved one have borne children for him, and the firstborn son belongs to the unloved wife, 16then on the day that he bequeaths what he owns to his sons, he cannot declare the son of the loved wife as his firstborn in preference to the son of the unloved wife, who is the true firstborn. 17He must acknowledge the son of the unloved wife as the firstborn by giving him a double portion of everything that is recognized as his. Because that son is the beginning of his father's virility, the legal right of the firstborn belongs to him.