Jennifer Kostoff became pregnant when she relapsed briefly as a heroin user. Photo for The Washington Post by Whitney Curtis

Washington - Jennifer Kostoff had been in a heroin rehabilitation programme for a little more than a week when a routine blood screen showed she was pregnant. Caregivers told her she would have to leave. She could be a liability.

The inpatient centre near her Granite City, Illinois, home had prescribed her Suboxone - a drug often used to control cravings and drug withdrawal symptoms - but said last September that it could harm her unborn child. Kostoff worried that withdrawal wouldn't be safe for the baby, either. And would seeking treatment elsewhere lead her to trouble with law enforcement or losing custody of her baby?

"Most people think, 'How could you not stop with a baby in your belly?' " Kostoff said. "But the physical cravings, the mental cravings, they take over despite what's going on with your body."

"Oftentimes what I see is that we treat pregnant women even worse than we treat the general population with opioid use disorder," said Stephen Patrick, a neonatologist and assistant professor at Vanderbilt University School of Medicine in Nashville. "We should be offering them more compassion."

But some doctors and caregivers are wary of pregnant women receiving opioid addiction treatment drugs, which have potential for abuse.

And child-welfare advocates and law enforcement officers are reeling from cases in which parents seem to choose drugs over their young children.

In April, a mother who was abusing pills and heroin in Utah crushed Suboxone pills and rubbed them onto her newborn daughter's gums while nurses were out of the room, hoping to mask the child's symptoms of drug withdrawal. She and the baby's father were later arrested.

In February 2016, Richardson went into labor on a snowy, residential road in Missouri while high on heroin. She panicked, knocked on the door of a nearby home, and gave birth to her son Da'Khorous in a stranger's bathroom.

Richardson never went to a doctor for prenatal care, and unsuccessfully tried to quit using heroin multiple times. She worried that if she told a doctor the truth about her addiction, she'd lose her four other children.

She was right: Richardson lost custody of all of her children and was sent to jail on a previous theft charge. She is now in recovery and has her children back at home, but she believes that if she had found and accepted a support system early on, it would have been easier.

"It's hard being a single mom and being in recovery. I was scared," Richardson said. "I am that person that nobody thought would get clean, but it's possible to change your life."

Kimberly Spence, a neonatologist at SSM Health Cardinal Glennon Children's Hospital in St. Louis, often cares for newborns who receive the withdrawal diagnosis, typically putting them on a tapering dose of morphine to reduce withdrawal symptoms. She suggests that allowing the babies to be close to their mothers - rather than taking them away - can be helpful.

"These mothers will stay clean if we show them that they can bond with the baby, that they are successful," Spence said, noting that taking the baby away can exacerbate the mother's drug problem. "They no longer have a reason to want to stay clean."