It’s common for people who suffer from irritable bowel syndrome (IBS) to also struggle with depression. Now, a small study published in the journal Gastroenterology suggests that taking a probiotic supplement may provide relief from both conditions.

The randomized, placebo-controlled trial shows a connection between probiotics and mood improvement in people with IBS and depression or anxiety, as well as changes in brain regions related to emotional processing. Most previous research on this topic has been on healthy people without mood disorders.

For the new research, scientists from McMaster University in Canada recruited 44 adults with IBS as well as mild to moderate anxiety or depression. They were followed for 10 weeks; half took a daily dose of the probiotic Bifidobacterium longum, and half took a placebo. The probiotics were manufactured and provided by Nestle, which also funded the study. (Nestle was not involved in collection, analysis or interpretation of study data.)

After six weeks, twice as many people who took the probiotic had decreased depression scores compared to those who took the placebo: 64% versus 32%. Results were similar after 10 weeks, as well. When people in the study were given functional MRI scans, the researchers found that improved depression scores were associated with changes in activity of several brain areas involved in mood regulation.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Those changes in brain activity “support the notion that this probiotic has anti-depressive properties,” the authors wrote in their paper. While their data did not show significant independent changes in anxiety, constipation, diarrhea or pain, people who took the probiotic did report improvements in overall symptoms of IBS and in quality of life.

One explanation for the improved mood in the group taking probiotics could be that because their physical symptoms feel better, their mood gets better too. That’s why Dr. Roger McIntyre, professor of psychiatry and pharmacology at the University of Toronto, thinks the fMRI findings are the most interesting and important aspect of the new study: they signal that the probiotics may really be working on the brain itself.

MORE: You Asked: Should I Take Probiotics?

“We know that one part of the brain, the amygdala, tends to be red hot in people with depression, and it seemed to cool down with this intervention,” says McIntyre, who was not involved in the new research. “It provides more scientific believability that something in the brain, at a very biological level, seems to be affected by this probiotic.”

No serious side effects related to the probiotic were reported, suggesting that such a supplement could be a safe way to treat both stomach- and mood-related symptoms. Studies have looked at various types of probiotics for IBS patients, the authors wrote, and a recent review found that bifidobacteria seemed to work better for gastrointestinal symptoms than another common probiotic, lactobacilli.

Some experts believe that gut bacteria influence the brain (and vice versa) mainly through systemic inflammation. But in this study, the researchers found no difference in inflammatory markers between the probiotic and the placebo group. McIntyre points out that the bowel communicates with the brain through other pathways as well, including the metabolic and nervous systems.

MORE: Should I Eat Olives?

The study’s findings need to be confirmed in larger independent trials, and McIntyre says he wouldn’t yet recommend taking a probiotic for symptoms associated with mental disorders like depression or anxiety. (Study co-author Premysl Bercik, associate professor of medicine at McMaster University, says the formula used in the new research isn’t commercially available, anyway.) “The evidence at this point is promising,” says McIntyre, “but it is not sufficient to justify recommending to patients as a viable treatment strategy.”

But McIntyre says the results are encouraging. “They seem credible to me, and they might hint that there are other mechanisms, besides just inflammation, linking the GI tract to the brain,” he says.

Contact us at letters@time.com.