Taylor and Daniel Mahaffey desperately wanted their child, but it was not to be. When premature labor started at 20 weeks, there was nothing anyone could do to stop the process. Nor could they make Taylor Mahaffey comfortable, or put an end to her pregnancy humanely.

Instead, she was forced to wait for the child to die somewhere between her uterus and cervix and then deliver him, stillborn.

On Wednesday night, Taylor, 23, felt something abnormal and since their last pregnancy ended in miscarriage, they rushed to the hospital. By the time they got there, Fox’s feet were already pushing through his mother’s cervix. Doctors tried several emergency measures to stop the preterm labor, including putting Taylor on an incline in the hopes that they could perform a cervical cerclage—a procedure in which doctors stitch shut the cervix. Nothing worked. Nothing could save him.

Heartbroken, the Mahaffeys asked about their options. “The only humane thing to do at that point would be to pop the sack, and let little Fox come into this world too early to survive outside,” 29-year-old Daniel Mahaffey wrote Monday, telling his story on Reddit.

The doctors and nurses at St. David’s Medical Center in Austin cried with them, but said because of Texas law HB2, they could not help speed Taylor’s labor. Technically, the baby was healthy and the mother was healthy, so to induce labor would be an abortion, and to do it at this stage in the pregnancy would be illegal.

The Mahaffeys were sent home to wait for their baby to die or for Taylor’s labor to progress. “We cried ourselves to sleep, waiting for him to come,” Daniel said in an interview with The Daily Beast.

They prayed conflicting prayers: for a miracle that might save him and for an end to their baby’s suffering. Daniel worried his wife would hemorrhage while Taylor could feel the baby struggling inside of her, Daniel said. Taylor declined to speak for this article.

When Taylor started bleeding, they went back to the hospital, but with Fox’s heart still beating, doctors couldn’t legally interfere.

“Eventually she was just screaming at them to get the child out of her,” Daniel said.

After four days in and out of the hospital, the bag of waters surrounding their baby burst and Taylor delivered Fox. “One nice thing is we got to hold him,” Daniel said. “That’s the only silver lining.”