Deuteronomy 21:16

16 then it shall be, in the day that he causes his sons to inherit that which he has, that he may not make the son of the beloved the firstborn before the son of the hated, who is the firstborn:

Deuteronomy 21:16 In-Context

14 It shall be, if you have no delight in her, then you shall let her go where she will; but you shall not sell her at all for money, you shall not deal with her as a slave, because you have humbled her.
15 If a man have two wives, the one beloved, and the other hated, and they have borne him children, both the beloved and the hated; and if the firstborn son be hers who was hated;
16 then it shall be, in the day that he causes his sons to inherit that which he has, that he may not make the son of the beloved the firstborn before the son of the hated, who is the firstborn:
17 but he shall acknowledge the firstborn, the son of the hated, by giving him a double portion of all that he has; for he is the beginning of his strength; the right of the firstborn is his.
18 If a man have a stubborn and rebellious son, who will not obey the voice of his father, or the voice of his mother, and, though they chasten him, will not listen to them;
The Hebrew Names Version is in the public domain.