Any surgery involves risks, but the hazards for the youngest patients going under the knife may be more lasting than doctors had thought.

In a study involving 5,357 children born in Rochester, Minn., scientists found that children who had had two or more surgeries by the time they were 2 were twice as likely to be diagnosed with ADHD by the time they were 19, compared with youngsters who had had only one surgical procedure.

“It’s not the finding we wanted,” says the study’s senior author Dr. David Warner, professor of anesthesiology at Mayo Clinic. “When we started the study, we hoped we could say there was no evidence of any problems. But unfortunately that’s not what we found.”

The results support an earlier study he and his colleagues conducted looking at the effect of multiple surgeries on children’s learning disabilities. In that investigation, they also found that youngsters who had had more operations by age 2 were more likely to have problems with reading, writing and language, as well as behavioral issues in school.

The reason for the link is not clear, but doctors think it has to do with the effect of general anesthesia. The drugs may accelerate the normal pruning, or death, of neurons that occurs early in life, as babies’ brains, which are constantly forming new connections, feel out which ties will be essential and which are dispensable. Exposure to the agents in anesthesia, for some reason, triggers nerves to die off, and that may lead to thinner neural networks that contribute to learning problems later in life.

“The results are pretty consistent,” says Warner, noting that animal studies have also suggested that newborn rodents and primates exposed to anesthesia show changes in brain structure and behavior. Similar results have been found across all commonly used anesthetics as well.

The association between anesthesia and ADHD remained, even after the scientists adjusted for other potential factors that could contribute to higher ADHD risk, such as whether the babies were born prematurely or had other medical problems, the relationship remained. Further, when Warner and his team looked at the conditions for which the children were receiving surgery, they found that only a small percentage were being treated for serious medical conditions such as neurological problems. Most infants had relatively routine procedures, such as having tubes put in their ears to promote drainage of fluid, that are not known to be associated with learning disabilities. That seems to suggest, says Warner, that there is something about exposure to the anesthesia — and not the underlying reason for surgery — that might be influencing development.

While the results certainly hint that multiple exposures to anesthesia may affect a brain in development, Warner acknowledges that his study cannot prove that the chemicals actually cause ADHD. To show a causal link, a study would have to randomly assign infants to receive or not receive anesthesia, and then compare their ADHD rates at a later time. Therefore, it might still be possible that some other factor, perhaps another underlying medical condition that required the children to have multiple surgeries in the first place, might be contributing to their risk of ADHD.

That’s why for now, Warner isn’t advising parents to decline surgery if their child needs it. In almost all cases, he says, the benefits of the surgery will outweigh the potential risk from anesthesia. For the most part, doctors don’t recommend surgery for infants unless it’s necessary, so these results shouldn’t sway parents from receiving those potentially life-saving treatments.

At the same time researchers should not dismiss the current findings, says Warner, but continue to investigate them further to better understand whether and how anesthesia is affecting young brains. “We tried everything in our analysis to make this go away,” says Warner. “And we haven’t been able to.”

Alice Park is a writer at TIME. Find her on Twitter at @aliceparkny. You can also continue the discussion on TIME’s Facebook page and on Twitter at @TIME.