Deuteronomy 21:16

LEB(i) 16 nevertheless it will be the case that* on the day of bestowing his inheritance upon his sons, he will not be allowed to treat as the firstborn son the son of the beloved wife in preference to* the son of the disliked wife, who is the firstborn son.