When I was pregnant with twins more than five years ago, I began compiling a list of my worst fears. The list included 19 items, from pesticides to roaches to blood clots to a parasitic infection that terrified me so much that I referred to it as “the disease whose name I refuse to say.” Then there were the more abstract fears: “Being too anxious to function during pregnancy.” “God punishing me.” “Angry God in general.”

At least one of these fears proved true. I was so debilitated by anxiety and depression during my pregnancy that it was indeed almost impossible for me to function. I couldn’t sleep at night, suffering from a strange, almost physical sensation that a concrete slab was hovering inches above my body. Finally, in my 15th week of pregnancy, I dragged myself to my ob/gyn and told her about my unbearable fears, crying inconsolably. She looked at my chart, looked me in the eye, and prescribed an antidepressant. “Take the happy pills, Josie,” she said, “or you will end up in the hospital.”

“Take the happy pills, Josie,” she said, “or you will end up in the hospital.”

My relief when she said those words was indescribable. She had given me permission to treat what I now know was a serious illness. I’d already been attending weekly consultations with a cognitive behavioral therapist—but in my case, talk therapy was not enough. I took a low-dose selective serotonin reuptake inhibitor (SSRI) for the rest of my pregnancy, and for about five months after the birth of my children.

The myth of the perfect pregnancy

Up to 15% of women suffer from depression during pregnancy. Untreated depression is associated with increased smoking and alcohol use, as well as suicidal behaviors. Babies can be affected as well: Studies have linked maternal depression and anxiety to impaired fetal growth, pre-eclampsia, and premature delivery. Given these risks, the US Preventive Services Task Force (USPSTF) recommended on Jan. 26 that all pregnant and postpartum women should be screened for depression.

“There used to be this myth that pregnancy was this incredible protected time, where women floated around on a cloud of pheromones, and had this glow, and were blushing, and everything was perfect in their life,” maternal-fetal psychiatrist Tamar Gur of the Ohio State University Wexner Medical Center tells Quartz. “We know now that pregnancy isn’t a protected time at all, and if you have a history of depression or anxiety, you might have an increased risk of having that during your pregnancy.”

Are antidepressants safe for pregnant women?

But the medical community is at odds over the risks and benefits of prescribing antidepressants during pregnancy. The USPSTF expert panel does not recommend that pregnant women diagnosed with depression take antidepressants, although it notes that the likelihood of “serious fetal harms” from their use is low. Instead, the panel recommends that pregnant women opt for cognitive behavioral therapy.

Nonetheless, between 3% and 13% of pregnant women are prescribed antidepressants—mostly SSRIs. Meta-analyses of research on the effects of SSRIs during pregnancy show conflicting results. Two studies found that children exposed to SSRIs during pregnancy showed no differences in IQ, language development, or temperament. However, another study of 31 children found “subtle effects” of SSRIs on motor development and control in newborns.

Four studies examining anxiety in infants found “no adverse effects” of prenatal exposure to SSRIs. But one recent report in The Journal of the American Medical Association Pediatrics suggested that taking antidepressants during pregnancy could double the child’s risk of autism, from about 1% to approximately 2%. That said, the autism study has a “critical flaw,” according to Roy Perlis, a psychiatric geneticist at Harvard quoted in the journal Science. Perlis notes that women suffering from psychiatric illnesses are already at greater risk of having children with autism spectrum disorder.

“You can never convince me that helping a mother out of depression would hurt their babies.”

What to make of all this conflicting evidence? “There are a relatively large number of studies of SSRIs in pregnancy; however, what we have seen is inconsistent findings of small risks of different problems varying across these studies,” doctors Ruta Nonacs, Marlene Freeman and Lee Cohen write in a 2012 statement issued by Massachusetts General Hospital Center for Women’s Health.

“While we cannot say that SSRIs or any medications are risk-free during pregnancy, we can say that studies over decades have failed to demonstrate a consistent risk of teratogenicity [birth defects],” the authors continue. Doctors lack clear clinical guidelines on the treatment of depression during pregnancy, but SSRIs do seem to have become a more common option. The use of antidepressants during pregnancy in the US increased from 2% in 1997 to over 7% in 2008, according to a recent report published in the Annual Review of Clinical Psychology.

For her part, Gur says she is willing to prescribe SSRIs for severe anxiety and depression.

“I always tell my moms that I treat that they’re on the same team as their child. What’s good for them is good for their babies,” Gur tells Quartz. “I have seen too many mothers come in, haggard, post-partum, depressed, and they’re not able to able to care for their child in the way that they want to, or the way their babies deserve. You can never convince me that helping a mother out of depression would hurt their babies.”

The promise of probiotics

While antidepressants remain a subject of debate, a growing body of research suggests that probiotics could be a safe and effective treatment option for pregnant women suffering from stress.

Prenatal stress is linked to changes in infants’ gut bacteria, according to a 2015 study of 56 pregnant women and their babies, led by Carolina de Weerth and Maartje Zijlmans of Radboud University Nijmegen in the Netherlands and published in the peer-reviewed journal Psychoneuroendrocrinology. Those babies whose mothers had experienced higher levels of stress during their pregnancy had higher levels of pathogenic bacteria in their gut, and lower levels of healthy “good bacteria.” Babies born to high-stress moms were also more likely to have allergies and intestinal disorders. One recent study led by Gur suggests that stress-induced changes in maternal microbial communities can affect infant brain development, as well.

Probiotics could be a safe and effective treatment option for pregnant women suffering from stress.

Both de Weerth and Gur agree that maternal stress might be alleviated if the mother takes probiotics, or “good” bacteria, during pregnancy. “We don’t know which bacterial strains would work, and whether they actually positively influence maternal intestinal microbiota,” de Weerth tells Quartz. But she points to a placebo-controlled trial conducted in 2011. The study showed that 30 days of taking two strains of “good” bacteria—Lactobacillus helveticus and Bifidobacterium longum—decreased anxiety, depression, anger and hostility in subjects, perhaps because these bacteria release substances that reduce inflammation.

Further studies could help find solutions to the mental health problems that take a clear toll on the health of mothers and children. In my case, taking antidepressants dulled the constant, knife-like anxieties that plagued me. (Thrice-weekly swimming helped, too.) I was able to start sleeping better at night. None of my terrible fears materialized. I gave birth to my twins—now healthy five-year-olds who are happy and full of life. Soon after, the concrete slab I imagined suspended over my head dissolved at last.