(CNN) Antibiotics commonly prescribed to babies may lead to an increased risk of allergies later in childhood, possibly because the medications can affect an infant's gut bacteria, according to a new research paper.
The research was published in the medical journal JAMA Pediatrics on Friday. It found that infants who were given antibiotics -- penicillin, cephalosporin, sulfonamide or macrolide -- had a greater chance of developing allergies such as food allergies, asthma or dermatitis.
While the paper found a link between antibiotics and allergic disease, more research is needed to determine a causal relationship.
"I was surprised to see an association of all classes of antibiotics with the later development of allergic disease," said Dr. Cade Nylund, a pediatrician and pediatric gastroenterologist at the Uniformed Services University in Maryland, who was an author of the new research.
"We have demonstrated that not only are antibiotics associated with an increased risk of allergic disease but that there is an increased risk associated with the prescription of multiple classes of antibiotics," he said. "Limiting unnecessary antibiotic prescriptions for viral infections like the common cold may be a step towards preventing the development of allergic disease."
The research involved analyzing the medical records of 798,426 children who were beneficiaries in the Department of Defense TRICARE health care program and born between 2001 and 2013.
The researchers examined which children had been given prescriptions for penicillin, penicillin with B-lactamase inhibitor, cephalosporin, sulfonamide or macrolide within the first six months of life.
The researchers also examined which children were later diagnosed with an allergy such as food allergy, anaphylaxis, asthma, atopic dermatitis, allergic rhinitis, allergic conjunctivitis or contact dermatitis.
The researchers found that the antibiotics they assessed were associated with increased risks for a subsequent diagnosis of allergic disease. The risk was lowest for sulfonamides and highest for penicillin.
"Being prescribed an antibiotic increased the risk of later development of allergic disease anywhere from 8% for food allergy to 47% for the development of asthma," Nylund said.
The study had some limitations, including that the research found an association but not a causal relationship. So, it could be that infants at increased risk of developing allergic disease also may be more susceptible to bacterial infections requiring antibiotics.
More research is needed to determine the nature of the association that was found.
"We should be careful in stressing this is an association and not a cause and effect relationship," said Dr. Purvi Parikh, an allergist and immunologist at NYU Langone Health in New York and a spokesperson for the Allergy and Asthma Network, who was not involved in the new research.
One reason why there might be an association is because, "our microbiomes, specifically in our gut, play a large role in our immune systems. Antibiotics are known to not only kill the bacteria that are causing an infection but also 'good' bacteria our immune system needs to protect us from developing allergic or autoimmune diseases," Parikh said.
She added that the research is "helpful" in the sense that "it further affirms what we know about antibiotic use being associated with microbiome changes, which may lead to various immune diseases such as allergic conditions."
Overall, "parents should know this study shows an association but not necessarily cause and effect. So, if a child truly needs an antibiotic for a bacterial infection, they should not withhold it due to fear of allergic disease," she said. "However, on that same note, one should not over use antibiotics if not needed -- for a virus or a cold -- as there may be long-term consequences from over use."