Dr. James Greenblatt, a Boston-area psychiatrist, had a puzzling case: a teenager arrived in his office with severe obsessive–compulsive disorder (OCD), as well as attention deficit hyperactivity disorder (ADHD) and an array of digestive problems.

"Mary's parents had been running around for many years and she'd had a poor response to medicine," said Greenblatt, founder of Comprehensive Psychiatric Resources Inc. in Waltham, Mass. "When a patient doesn't respond, that's a red flag."

Greenblatt first did a simple urine test for the metabolite HPHPA, the chemical byproduct of the clostridia bacteria, and found that it was elevated. He put her on a course of high-powered probiotics to boost her good bacteria, followed by antibiotics, and her levels began to "dramatically" go down, he said.

After six months, Mary's symptoms began to disappear. And by a year, they were gone. Today, three years later, Mary is a senior in high school and has no sign of either mental disorder.

Read about the ins and outs of gut bacteria.

Greenblatt does not practice alternative medicine; his expertise is in psychopharmacology and he is a clinical faculty member at Tufts Medical School.

"I start with integrative medicine, but I have my prescription pad right by my side," he told ABCNews.com.

Greenblatt, like many others, are beginning to recognize the power of healthy gut bacteria. The average adult carries up to five pounds of bacteria -- trillions of microbes -- in their digestive tract alone.

A recent study in the journal Science showed that thin and fat people have different bacteria -- a discovery that could lead to weight-loss programs. Doctors have also been using fecal transplants to seniors when their gastrointestinal health is compromised in nursing home living.

And now, scientists think there may be a link between what's in your gut and what's in your head, suggesting that bacteria may play a role in disorders such as anxiety, schizophrenia and autism. In some patients, the strep bacterium has been linked to OCD in a condition known as PANDAS.

Strep throat can trigger obsessive-compulsive disorder.

A study published in Nutritional Neuroscience from The Great Plains Laboratory, has shown that HPHPA levels are much higher in the urine of autistic children. Those treated with antibiotics effective against the bacteria clostridia show a decrease in symptoms.

Babies are born with a sterile digestive tract and first acquire their bacteria while traveling through the birth canal and get more in breast milk and in the world outside the womb through contact with other people.

Greenblatt said he had treated hundreds of patients for dysbiosis, a condition of microbial imbalances on or inside the body. "It's a more common scenario than we know," he said.

Scientists are so far unable to identify every strain of bacteria, but they can test for the chemical byproducts that they produce, according to Greenblatt.

He said he checks every patient for HPHPA with a simple organic acid urine test before moving ahead with medications to treat symptoms.

"Eight out of 10 people are fine," he said. "But in the two patients where it's elevated, it can have profound effects on the nervous system."

"I don't know why this test isn't done on every psychiatric patient," he said. 'I question that every day."

HPHPA causes deactivation of an enzyme so that dopamine cannot be converted to the neurotransmitter neuroepinephrine, Greenblatt said, and that causes a build-up of dopamine.

In one 2010 study at McMaster University in Canada, published in the journal Communicative and Integrative Biology, scientists found a link between intestinal microbiota and anxiety-like behavior.

Researchers compared the behaviors of normal 8-week-old mice and those whose guts were stripped of microbes. Those without bacteria showed higher levels of risk-taking and the stress hormone cortisol. They also had altered levels of the brain chemical BDNF, which has been linked to anxiety and depression in humans.

Researchers believe that in the immediate postnatal period, the "gut bacteria" have an impact on not just the immune system, but the development of the neuroendocrine and metabolic systems. Presence of microbiota regulates the "set point" for hypothalamic-pituitary-adrenal axis activity.

Research into the importance of gut bacteria is "well-established," and two other later studies have reaffirmed the McMaster study, according to its co-author Jane Foster, associate professor of neuroscience and behavioral science and part of the McMaster University & Brain-Body Institute.

"The gut bacteria talk to the brain in multiple ways through either the immune system or the enteric nervous system," said Foster. "It's sort of like if you imagine a mesh network and you took your intestinal tract and wrapped that like a hot dog bun outside a hot dog. There are more neurons that directly surround your GI tract than in the whole spinal cord."

However, while using probiotics may help a "subset of patients," she said, it's not a "magic bullet." Early life stresses, nutrition and building a strong immune system all play an important role in a person's mental health, she said.

Key life transitions -- adolescence and menopause, for example -- are when "big changes" are going on in the gut-brain relationship and probiotics might be helpful in building stronger resilience.

"Anyone who has a mental health disorder that coincides with a GI disorder is a good candidate for probiotics," she said.

One such candidate was Adam Johnson, who since the age of 5 has struggled with ADHD, anxiety and some mood disorders, and has been treated with a variety of medications.

"We know now he had too much stimulation and realize his brain worked differently than everyone else's," said his mother, Kay Lynn Johnson of Massachusetts.

LEGAL DISCLAIMER - This website is not intended to replace the services of a physician, nor does it constitute a doctor-patient relationship. Information on this web site is provided for informational purposes only and is not a substitute for professional medical advice. You should not use the information on this web site for diagnosing or treating a medical or health condition. If you have or suspect you have an urgent medical problem, promptly contact your professional healthcare provider.

Any application of the recommendations in this website is at the reader's discretion. Heather Van Vorous, HelpForIBS.com, and Heather & Company for IBS, LLC are not liable for any direct or indirect claim, loss or damage resulting from use of this website and/or any web site(s) linked to/from it. Readers should consult their own physicians concerning the recommendations on these message boards.