1,871. Yibum with a Pregnant Yevama
Yibum v’Chalitzah 1:22
Let’s say that a man marries his yevama and she is subsequently found to be pregnant. They must separate and wait. If she miscarries, they remain married. If she gives birth but the baby dies, even on the day it’s born, then he must divorce her, both by giving her a get and by performing chalitzah, after which she is free to marry someone else. If the baby lives for 30 days after birth, it is deemed viable and divorce is unnecessary because their relationship is a major prohibition (and marriage was therefore never effected).
Yibum v’Chalitzah 1:23
If the woman gives birth to a viable child six months after performing yibum, there is a question as to whether it's the full-term child of her late husband or the premature child of the yavam. Therefore, the yavam should divorce her using a get; the child is considered legitimate. If this couple has relations after she gives birth, any children born as a result are of doubtful legitimacy.