Deuteronomy 21:16

ISV(i) 16 then when he bequeaths his possessions to his sons, he must not give preference to the firstborn of the beloved wife over the firstborn of the unloved wife.