Deuteronomy 21:15-17

VIN(i) 15 "If a man has two wives where one is loved but the other is unloved, and both of them bear him sons, but the firstborn is the son of the unloved wife, 16 Then when he gives his property to his sons for their heritage, he is not to put the son of his loved one in the place of the first son, the son of the hated wife: 17 But he shall acknowledge the son of the hated as the first-born by giving him a double portion of all that he has. For he is the beginning of his strength. The right of the first-born is his.