CNN  — 

Serious infections during childhood have been tied to a subsequent increased risk of mental disorders in a new study.

The study, published in the journal JAMA Psychiatry on Wednesday, found that infections requiring hospitalizations were associated with an about 84% increased risk of being diagnosed with any mental disorder and an about 42% increased risk of using psychotropic drugs to treat a mental disorder.

Less severe infections treated with anti-infective medications, like antibiotics, were associated with increased risks of 40% and 22%, respectively, the study found.

“The surprising finding was that the infections in general – and in particular, the less severe infections, those that were treated with anti-infective agents – increased the risk for the majority of mental disorders,” said Dr. Ole Köhler-Forsberg, a neuroscientist and doctoral fellow at Aarhus University in Denmark, who led the study.

Yet he emphasized that the study found only a correlation, so the findings do not mean that infections, or receiving treatment for them, can cause mental disorders.

“Parents should not be afraid when their children get sick or when they need antibiotics,” Köhler-Forsberg said.

“Infections per say are not bad. People need infections to develop the immune system, but in some cases, the infection can increase the risk for a mental disorder,” he said. “The overall take-home message is that there’s an intimate connection between the body, the immune system, infections, inflammation and the brain.”

For the study, Köhler-Forsberg and his colleagues analyzed health data on more than 1 million people born in Denmark between 1995 and 2012, taking a close look at their medical histories from birth to late adolescence.

The data came from two registries: the Danish National Patient Registry and the Danish National Prescription Registry.