Deuteronomy 21:16-17

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. 17 But he shall acknowledge the firstborn son of the disliked wife by giving* him a double portion of all that he has,* for he is the firstfruit of his vigor;* to him is the legal claim of the birthright.*