How Babies Get Bacterial Infections Before and After Birth

Babies pick up bacterial infections through a surprisingly wide range of routes, starting before they’re even born. Some bacteria pass directly from mother to baby during pregnancy or delivery, while others come from the hospital environment, caregivers’ hands, or medical equipment after birth. Understanding these pathways helps explain why certain precautions, like prenatal screening and hand hygiene, matter so much in those first weeks of life.

During Pregnancy: Crossing the Placenta

Certain bacteria can travel through a pregnant person’s bloodstream, cross the placenta, and reach the fetus directly. This is called transplacental or in utero transmission. It’s relatively uncommon compared to other routes, but when it happens, it can cause serious complications because the baby’s immune system is still developing and has very limited ability to fight off infection on its own.

During Birth: The Birth Canal

The most common way newborns encounter harmful bacteria is during vaginal delivery. As the baby passes through the birth canal, it’s exposed to whatever bacteria the mother carries in her vaginal and rectal area. Most of these bacteria are harmless or even beneficial, but some can cause illness.

Group B Streptococcus (GBS) is the biggest concern here. About 1 in 4 pregnant people carry GBS in their vaginal or rectal tract without any symptoms. On its own, GBS is harmless to adults, but it can cause serious bloodstream infections and meningitis in newborns. GBS and E. coli together account for more than half of all early-onset neonatal sepsis cases, according to CDC surveillance data.

Because GBS is so common and so dangerous to newborns, routine screening is now standard. The American College of Obstetricians and Gynecologists recommends that all pregnant people be tested for GBS between 36 and 37 weeks of pregnancy using a vaginal-rectal swab. Those who test positive receive antibiotics through an IV during labor, which dramatically reduces the chance of passing the bacteria to the baby. If a person’s GBS status is unknown when labor begins, antibiotics are recommended when other risk factors are present, such as preterm labor, water breaking 18 or more hours before delivery, or fever during labor.

In the Hospital After Birth

Babies who spend time in a neonatal intensive care unit (NICU) face additional infection risks simply because of their environment. These infections, sometimes called late-onset infections, typically show up after the first few days of life and come from bacteria the baby encounters outside the womb.

Hospital water systems, including sinks, taps, and drains, have been identified as potential sources of harmful bacteria in NICUs. Research has found that sinks in these units are frequently used for tasks beyond handwashing, like disposing of liquids and cleaning equipment, which introduces nutrients that encourage bacterial growth. NICUs also have specialized areas for milk storage and bottle cleaning located near sinks, raising the risk of cross-contamination between the sink environment and the milk that gets fed to patients.

Premature babies are especially vulnerable because they often need invasive support like breathing tubes, feeding tubes, and IV lines. Each of these devices creates a potential entry point for bacteria to bypass the skin, which is a baby’s first line of defense. The longer a baby needs these devices, the higher the infection risk.

From Caregivers and the Environment

Outside the hospital, babies encounter bacteria through the same basic routes anyone does: skin-to-skin contact, respiratory droplets, and contaminated surfaces. The difference is that a newborn’s immune system is far less equipped to handle these exposures. Bacteria that an adult’s body would fight off without notice can overwhelm a baby, particularly in the first month of life.

Unwashed hands are one of the most straightforward transmission routes. Anyone holding, feeding, or caring for a newborn can transfer bacteria from their own skin or from surfaces they’ve touched. This is why handwashing before handling a baby is emphasized so heavily by pediatricians.

How Breastfeeding Builds a Natural Defense

A baby’s gut plays a central role in fighting off harmful bacteria, and the process starts with its very first meals. Breast milk contains complex sugars called human milk oligosaccharides that the baby itself cannot digest. Instead, these sugars feed a specific beneficial bacterium in the infant gut. This bacterium breaks down the milk sugars into acidic compounds, mainly lactate and acetate, which lower the pH inside the baby’s intestines.

This acidity matters because most harmful bacteria, including E. coli, Klebsiella, Clostridium, and Staphylococcus, prefer a near-neutral environment (pH 6.0 to 7.0) and grow poorly when conditions are more acidic (pH 5.5 or below). In clinical trials, breastfed infants who had robust populations of this beneficial bacterium had a gut pH averaging around 5.15, and the populations of these harmful bacteria dropped by over 93%. The load of antibiotic-resistant genes in their gut also fell by 90%.

When this beneficial bacterium is absent, which is increasingly common in infants born by cesarean section or exposed to antibiotics early on, those milk sugars pass through the gut undigested. Without the acidic byproducts, the gut stays at a higher pH, creating a more hospitable environment for dangerous bacteria to take hold. This process, known as colonization resistance, is one of the earliest and most important immune defenses a baby develops.

Why Timing Matters

Doctors distinguish between early-onset and late-onset neonatal infections based on when symptoms appear. Early-onset infections, typically arising within the first 72 hours, are almost always caused by bacteria the baby encountered from the mother during pregnancy or delivery. GBS and E. coli dominate this category. Late-onset infections develop after those first few days and are more likely linked to the baby’s surroundings: hospital equipment, caregivers, or the broader environment.

This timing distinction helps doctors quickly narrow down the likely cause and source of an infection. A baby showing signs of infection within hours of birth points toward maternal transmission, while symptoms emerging a week or two later suggest an environmental source. Both types can cause sepsis, a body-wide response to infection that is a leading cause of serious illness in newborns, but their prevention strategies differ. Early-onset infections are best prevented through prenatal screening and antibiotics during labor. Late-onset infections depend more on infection control practices like hand hygiene, careful handling of medical devices, and supporting the development of a healthy gut microbiome.