Infants in their first weeks of life sometimes need a macrolide antibiotic, most often to treat or prevent whooping cough (pertussis), which can kill very young babies. For decades the standard macrolide was erythromycin, until it became clear that erythromycin given in early infancy raises the risk of infantile hypertrophic pyloric stenosis (IHPS), a thickening of the muscle at the outlet of the stomach. Azithromycin, a close chemical relative, is now usually preferred. This article sets out what IHPS is, what the human studies show about azithromycin and erythromycin in the first weeks of life, how much confidence those findings deserve, and how parents and physicians can weigh the small but real risk against the danger of the infection being treated.

What pyloric stenosis is, and why timing matters

The pylorus is the muscular valve that controls how food passes from the stomach into the small intestine. In IHPS, the ring of muscle around it thickens and lengthens until milk can no longer pass easily. The condition typically appears between about two and eight weeks of age, most often around three to six weeks. In many Western populations it affects roughly two to three infants per thousand, although rates vary by country and era. Boys are affected about four times as often as girls, and a family history, being firstborn, and formula feeding have each been associated with higher risk.

The classic sign is forceful, "projectile" vomiting after feeds, without green bile, in a baby who remains hungry. Untreated, the vomiting leads to dehydration and a characteristic disturbance of blood chemistry (low chloride and potassium with metabolic alkalosis). Diagnosis is usually made by ultrasound. Treatment is a short operation, pyloromyotomy, in which the surgeon divides the thickened muscle while leaving the inner lining intact. Outcomes are excellent in settings with good surgical care, and long-term problems are uncommon. That reassurance matters: IHPS is a serious condition requiring prompt attention, but it is very treatable when recognised early.

Because the pyloric muscle appears to be especially susceptible in the first weeks after birth, the timing of any drug exposure turns out to be central to the risk.

The erythromycin story: how the link was discovered

The modern concern began with a hospital outbreak of pertussis in Knoxville, Tennessee, in 1999. Many newborns were given erythromycin as preventive treatment, and within weeks an unusual cluster of pyloric stenosis cases appeared. An investigation by the U.S. Centers for Disease Control and Prevention, published in The Lancet in 1999, found that infants who received erythromycin prophylaxis had roughly a sevenfold higher risk of IHPS than expected, and every affected infant had received the drug.

Larger studies followed. A Tennessee Medicaid cohort analysis published in the Archives of Pediatrics & Adolescent Medicine in 2002 found that erythromycin given in the first two weeks of life was strongly associated with IHPS, while exposure later in infancy carried little or no measurable excess risk. An Indiana case-control study in the Journal of Pediatrics (2001) reached a similar conclusion about very early exposure. Subsequent systematic reviews have consistently found the association with early postnatal erythromycin to be robust.

A plausible mechanism exists. Erythromycin stimulates the motilin receptor, which drives strong contractions of the stomach; it is in fact sometimes used deliberately in older patients as a "prokinetic" to speed gastric emptying. The leading hypothesis is that repeated vigorous contractions against the pylorus in a vulnerable window promote muscle overgrowth. This mechanism is supported by pharmacology but has not been directly proven in infants.

The strength of the erythromycin evidence comes from its consistency: an outbreak investigation, multiple population cohorts, a dose-and-timing pattern, and a biological explanation all point the same way.

What the studies show for azithromycin

Azithromycin was expected to be safer, partly because it is a weaker stimulator of the motilin receptor and partly because a typical infant pertussis course lasts five days rather than fourteen. However, azithromycin does have some prokinetic effect in adults, so the expectation of zero risk was never firmly grounded.

Case reports of IHPS after neonatal azithromycin appeared in the mid-2000s. The most informative study to date is a retrospective cohort from the U.S. Military Health System, published in Pediatrics in 2015 by Eberly and colleagues, covering roughly a million children born over about a decade. Compared with unexposed infants, the investigators reported:

These figures need careful reading. Only a small number of exposed infants developed IHPS, so the confidence intervals were wide; for early azithromycin exposure, the plausible true value ranged from under threefold to more than twentyfold. The azithromycin estimates are numerically lower than erythromycin's, but the ranges overlap substantially, so the study does not prove azithromycin is safer. What it does show is that azithromycin in the first weeks of life is associated with a meaningfully increased risk, and that, as with erythromycin, the earliest exposure carries the highest risk.

A Danish nationwide cohort published in the BMJ in 2014 by Lund and colleagues examined macrolides as a class. Infants given a macrolide in the first 13 days of life had a dramatically increased rate of IHPS (an adjusted rate ratio near 30), with a much smaller but still elevated risk for exposure between about two weeks and four months. That study was not designed to isolate azithromycin specifically, but it reinforces the pattern: the earlier the exposure, the greater the risk. A 2015 systematic review of azithromycin use in neonates, published in BMJ Open, likewise identified IHPS as the most important safety signal.

All of this evidence is observational. No randomised trial has been, or ethically could be, designed to test whether antibiotics cause IHPS. Observational studies can be distorted by confounding, for example if sicker infants both receive antibiotics and are more closely examined. Yet the timing pattern, the consistency across countries, and the known biology make a causal link for macrolides as a group reasonably convincing.

Exposure through the mother: pregnancy and breastfeeding

Parents often ask whether a mother taking azithromycin affects her baby. The evidence here is weaker and less consistent. Azithromycin passes into breast milk in small amounts. The Danish cohort found an association between maternal macrolide use in the first two weeks after birth and IHPS in breastfed infants, but this finding has not been uniformly replicated, and the absolute risk appears small. For macrolide use during pregnancy, studies have produced mixed results and no firm conclusion about a clinically important effect on IHPS.

Most authorities consider azithromycin compatible with breastfeeding, while advising that the infant be watched for feeding problems. Given the clear benefits of breastfeeding, mothers should not stop nursing over this concern without discussing it with their physician.

Keeping the risk in proportion

Relative risks sound alarming, so absolute numbers help. If a population's baseline IHPS rate is roughly 2 per 1,000 infants, an eightfold increase would mean something on the order of 1 to 2 affected infants per 100 exposed in the first two weeks. This is an illustrative calculation, not a precise prediction, since the true figure is uncertain and depends on the baby's other risk factors. The point is that most exposed infants will not develop IHPS, but enough will that parents and clinicians should watch for it.

Against this stands the danger of the infection itself. Pertussis is most deadly in the first months of life, when infants can stop breathing, develop pneumonia, or suffer brain injury. For this reason the CDC and the American Academy of Pediatrics recommend azithromycin as the preferred agent for treatment and post-exposure prophylaxis in infants under one month, while specifically advising that these infants be monitored for IHPS. Erythromycin is generally avoided in this age group. Neonatal chlamydial infection is another setting where a macrolide may be considered, with the same caution.

Clinicians should know that U.S. prescribing information for azithromycin does not establish safety and effectiveness in very young infants for most indications, so neonatal use for pertussis is off-label, though guideline-endorsed. The labeling also notes that IHPS has been reported after azithromycin use in neonates up to 42 days of age and advises that caregivers contact their physician if vomiting or irritability with feeding occurs. Off-label use of this kind is common and often appropriate in pediatrics, but it is information parents are entitled to have.

What parents can do

Every newborn is a life of immeasurable worth, entrusted to parents who are usually the first to notice when something is wrong. Watchfulness is not anxiety; it is good stewardship. If a young infant receives azithromycin, or erythromycin, reasonable steps include:

There is a quiet fittingness in the history of these drugs. Erythromycin was first isolated from a soil bacterium found in a sample from the Philippines in the early 1950s, and azithromycin was developed from it by chemists in Croatia around 1980. Medicines drawn from the created world have saved countless infants from pertussis, yet even good gifts must be used with knowledge and care. Informed parents, working closely with a physician they trust, are best placed to use them well.

Key takeaway: Azithromycin in the first weeks of life, particularly the first two, is associated with a higher risk of pyloric stenosis, probably somewhat less than with erythromycin though this is not proven, and because the infections it treats can be life-threatening, the sensible course is informed use with close watching for vomiting afterward.