Deuteronomy 21:15

ECB(i) 15
THE TORAH ON FIRSTBIRTHS When a man has two women, one beloved and one hated, and they birth him sons - both the beloved and the hated; and if the firstbirth son be hers that was hated: