Children of women who had been hospitalized with infections like the flu, pneumonia and sepsis while pregnant may have a much greater risk of having depression or autism spectrum disorder (ASD), according to a study published Wednesday in JAMA Psychiatry.

Why it matters: There's been some debate in the scientific community on whether infections in utero could be a factor in the development of ASD. This large and long-term study — which showed a 79% increased ASD risk and a 24% increased depression risk in those children — offers further evidence there may be a link, plus new information that this could also be a factor in depression, study author Kristina Adams Waldorf tells Axios.

What they did: The researchers used a large dataset of almost 1.8 million Swedish children born between 1973 and 2015, who were observed for up to 41 years using linked population-based registries.

"The real power in this study is found in the large numbers of subjects evaluated," Vanderbilt University Medical Center's David Aronoff, who was not part of this study, tells Axios.

Data were culled from inpatient hospital records on maternal infections and psychiatric outcomes.

The infection types they considered included: maternal infections, urinary tract inflections (UTIs) and severe infections, like sepsis, meningitis or encephalitis, pneumonia, influenza, pyelonephritis or chorioamnionitis.

The psychopathologic conditions they were looking for included ASD, bipolar disorder, depression and psychosis, including schizophrenia.

The team also wanted to check if the type and severity of the infection affected the magnitude of risk for psychopathologic conditions in the child.

What they found:

Fetal exposure to any maternal infection at the hospital — including UTIs — increased the risk of autism and depression, but not bipolar disorder or psychosis.

"We analyzed the information in many ways," said Adams Waldorf, a professor at the University of Washington School of Medicine."We found an increased rate of suicide in adults [born from this group] ... which helped corroborate our depression data."

Caveat: Study limitations include the fact that these are only based on women who were hospitalized — "this is not the case for the common cold," Adams Waldorf says — and only on people in Sweden.

Another limitation, Aronoff adds, is that these population-level data do not allow close study of patient-level information, such as how individual maternal infections were diagnosed or managed.

Outside comment:

"Studies such as this large Swedish study compel ongoing efforts to develop vaccines to prevent common infections during pregnancy and to more rapidly identify and treat infections that occur despite preventive efforts. [It] suggests that preventing infections during pregnancy might improve neurocognitive and mental health of offspring, which could have far-reaching, beneficial effects on population health and health care expenditures."

— David Aronoff

"Waldorf’s study raises the importance of focusing research on diagnosing the effects of maternal infection on the fetal brain, in utero. In collaboration with MRI experts, our group is investigating whether we can detect the adverse effects of maternal inflammation on the fetal brain, which would allow for the early identification of fetal brain injury and provide a window of opportunity for treating fetuses in utero.”

— Nardhy Gomez-Lopez, professor at Wayne State University, and not part of this study

Meanwhile, Adams Waldorf says pregnant women should talk to their doctors to see if they should get their flu vaccine and have their urine regularly tested for bacteria. Waldorf adds pregnant women should stay away from areas of measles or Zika outbreaks.