Deuteronomy 21:15
If a man has two wives, one beloved and the other unloved, and both bear him sons, but the unloved wife has the firstborn son,
What it says
A man has two wives, one loved and one unloved, and the firstborn son belongs to the unloved wife.
What it is doing
It presents the family situation where affection and birthright may collide.
In context
15If a man has two wives, one beloved and the other unloved, and both bear him sons, but the unloved wife has the firstborn son, 16when that man assigns his inheritance to his sons he must not appoint the son of the beloved wife as the firstborn over the son of the unloved wife. 17Instead, he must acknowledge the firstborn, the son of his unloved wife, by giving him a double portion of all that he has. For that son is the firstfruits of his father’s strength; the right of the firstborn belongs to him.