Deuteronomy 21:15
New International Version
15If a man has two wives, and he loves one but not the other, and both bear him sons but the firstborn is the son of the wife he does not love,
New International Version
15If a man has two wives, and he loves one but not the other, and both bear him sons but the firstborn is the son of the wife he does not love,