(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.