Daniel and Taylor Mahaffey were 20 weeks pregnant and desperately wanted their child, but when doctors informed them a complication meant the fetus had no chance of survival, they just wanted their baby’s suffering to end. Yet because of their state’s “fetal pain” law, the married Texans say they were forced to endure a stillbirth and wait as their baby slowly died in utero.

The Mahaffeys had begun decorating the nursery in anticipation for the little boy they planned to name Fox, after one of the Lost Boys in Peter Pan.

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.”

Texas is one of 12 states that bans abortions after 20 weeks post fertilization with bills ostensibly based on the wholly unscientific idea that fetuses can feel pain after that period of gestation. (A review of the evidence by the American Medical Association found that “fetal perception of pain is unlikely before the third trimester.”) The Texas ban was passed as a provision in HB2, the 2013 law best known for requiring abortion clinics to meet the same strict standards as ambulatory surgical centers and providers to have admitting privileges at nearby hospitals—restrictions that have closed half of the state’s abortion clinics and over which the Supreme Court heard oral arguments this month.

The Texas law does come with exemptions, for cases where a woman’s life or physical health is in danger or when severe fetal abnormalities are present, conditions that the Mahaffeys did not satisfy.

The Mahaffeys aren’t the only people arguing that bans on later abortions have a cruel real-world impact, come between patients and doctors, and add insult to injury for grieving families.

Last October, a 22-weeks pregnant Ohio woman traveled 300 miles to Chicago to abort a dying fetus when the Planned Parenthood in her home state wouldn’t perform the procedure.

In 2010 in Nebraska, Danielle Deaver came forward to say her state, the first in the nation to enact fetal-pain legislation, barred her doctors from inducing labor at 20 weeks, making her wait 10 days as her uterus slowly crushed her much-wanted baby, who survived only 15 minutes outside the womb.

“They could do nothing to make it better but tell us to wait, which made it worse,” Deaver said at the time. “Every time I felt movement, I was terrified she was hurting and trying to push the uterus away from her.”

Fifteen states have “20 week” abortion ban laws on the books, said Elizabeth Nash, a policy analyst for Guttmacher Institute, though in three states—Arizona, Georgia, and Idaho—the laws are blocked from enforcement due to court action.

Twelve states—Alabama, Arkansas, Indiana, Kansas, Louisiana, Mississippi, Nebraska, North Dakota, Oklahoma, Texas, West Virginia, and Wisconsin—have laws in effect. Thirteen state legislatures have introduced similar bans this year, Nash said.

In the run-up to the Texas bill’s passage, hundreds of people testified for and against the law in hearings before the House State Affairs committee.

Bradley Price, an OBGYN who practices at St. David’s where Taylor Mahaffey was treated by another doctor, spoke before the committee in July 2013, where he chided the legislature for attempting to practice medicine based on politics instead of sound science.

“This bill is extremely intrusive into the practice of medicine,” Price said, warning it risked Texas women’s health by denying them “the benefits of well-researched safe and proven protocols.”

Speaking on behalf of the Texas District of the American Congress of Obstetricians and Gynecologists (ACOG), Price, who delivered three babies before his testimony that day, further explained that most abortions performed after 20 weeks were on women like Taylor Mahaffey, whose fetuses had some condition that was incompatible with life.

“If you’re worried about pain at 20 weeks, what about pain at 40 weeks?” Price asked a representative who kept circling back to the topic of fetal development. “Are we going to ask babies to go through the birth canal still? Is vaginal delivery out of the question? If you take it to an illogical conclusion, that’s where you go.”

The Texas legislature passed HB2 despite Price’s testimony.

Now Daniel Mahaffey is hoping he can effect some change in the law with his own story. He’s written his state representatives and the presidential candidates, telling them about the loss of Fox, and the “inhumane” law that he says multiplied their pain.

“We moved here two years ago from Pittsburgh, where they would have done something,” he said. “It would have been a lot less traumatic, a lot more peaceful. It would have been so much nicer to go to the hospital and just send him home.

“We have to change the laws. There are no reasons to have these restrictions. It’s just people putting ideology in front of humanity.”

Update: After this article was published, St. David's North Austin Medical Center released a statement contradicting the Mahaffeys’ account. In part, it read that the HB2 20-week abortion ban, “does not apply in this particular situation,” and pointed to a different state abortion law passed in 2011, HB 15, which “requires informed patient consent, as well as a 24-hour waiting period, for pregnant women prior to termination.” Citing patient confidentiality, a hospital spokesperson told The Daily Beast she was unable to give any more details concerning the Mahaffeys’ care or respond to what the couple said they were told by hospital staff. Daniel and Taylor Mahaffey declined to comment further for this update.