Antibiotics and antacids can help relieve symptoms of colic experienced by little ones. But new findings published in JAMA Pediatrics reveals that infants given these medicines are at an increased risk for childhood allergies, reports The New York Times.

During a four-and-a-half-year period, study investigators assessed about 792,000 infants covered by health insurance to determine whether there was an association between the use of acid-suppressive medications or antibiotics in the first six months of infancy and the development of allergies in early childhood.

Researchers split babies into three groups: 131,708 received antibiotics, 60,209 were given histamine-2 receptor antagonists (H2 blockers) and 13,687 were treated with proton pump inhibitors (PPIs). (Both H2 blockers and PPIs are classes of drugs used to treat gastroesophageal reflex, aka GERD.)

Findings showed that infants who received H2 blockers or PPIs were more than twice as likely to develop a food allergy compared with those who weren’t treated with these meds. (There was an especially high risk for allergy to cow’s milk.) Scientists noted that those given antibiotics experienced a 14 percent increased risk for food allergy, a 51 percent greater risk for anaphylaxis (a life-threatening allergic reaction) and more than double the risk for asthma.

“Let’s not prescribe these medicines for things that are very common in babies,” said Cade M. Nylund, MD, MS, an associate professor of pediatrics at the Uniformed Services University in Maryland, and the study’s senior author. “Just because a baby spits up doesn’t mean that it’s a disease that requires treatment with a PPI. And we have to avoid overprescribing antibiotics for upper respiratory infections and other viral illnesses.”

Click here to learn how kids with asthma are being prescribed unnecessary antibiotics.