Deuteronomy 21:15

Amplified Bible (AMP)
“If a man has two wives, one loved and the other [b]unloved, and both the loved and the unloved have born him sons, and the firstborn son belongs to the unloved wife,

Read Deuteronomy 21:15 in other translations