Antibiotic treatment is common practice in the neonatal ward for the prevention and treatment of sepsis, which is one of the leading causes of mortality and morbidity in preterm infants. Although the effect of antibiotic treatment on microbiota development is well recognised, little attention has been paid to treatment duration. We studied the effect of short and long intravenous antibiotic administration on intestinal microbiota development in preterm infants. Faecal samples from 15 preterm infants (35 ± 1 weeks gestation and 2871 ± 260 g birth weight) exposed to no, short (≤ 3 days) or long (≥ 5 days) treatment with amoxicillin/ceftazidime were collected during the first six postnatal weeks. Microbiota composition was determined through 16S rRNA gene sequencing and by quantitative polymerase chain reaction (qPCR). Short and long antibiotic treat ment significantly lowered the abundance of Bifidobacterium right after treatment (p = 0.027) till postnatal week three (p = 0.028). Long treatment caused Bifidobacterium abundance to remain decreased till postnatal week six (p = 0.009). Antibiotic treatment was effective against members of the Enterobacteriaceae family, but allowed Enterococcus to thrive and remain dominant for up to two weeks after antibiotic treatment discontinuation. Community richness and diversity were not affected by antibiotic treatment, but were positively associated with postnatal age (p < 0.023) and with abundance of Bifidobacterium (p = 0.003). Intravenous antibiotic administration during the first postnatal week greatly affects the infant’s gastrointestinal microbiota. However, quick antibiotic treatment cessation allows for its recovery. Disturbances in microbiota development caused by short and, more extensively, by long antibiotic treatment could affect healthy development of the infant via interference with maturation of the immune system and gastrointestinal tract.