Deuteronomy 21:15
Laws Concerning Children
21:15 Suppose a man has two wives, one whom he loves more than the other, and they both bear him sons, with the firstborn being the child of the less loved wife.
Deuteronomy 25:6
25:6 Then
the first son
she bears will continue the name of the dead brother, thus preventing his name from being blotted out of Israel.