Background: Infants born by caesarean section or receiving antibiotics are at increased risk of developing metabolic, inflammatory and immunological diseases, potentially due to disruption of normal gut microbiota at a critical developmental time window. We investigated whether probiotic supplementation could ameliorate the effects of antibiotic use or caesarean birth on infant microbiota in a double blind, placebo- controlled randomized clinical trial. Mothers were given a multispecies probiotic, consisting of Bifidobacterium, Lactobacillus, and Propionibacterium strains, or placebo supplement during pregnancy and the infants were given the same supplement. Fecal samples of the infants were collected at 3 months and analyzed using taxonomic, metagenomic and metaproteomic approaches.Results: The probiotic supplement had a strong overall impact on the microbiota composition, but the effect depended on the infant's diet. Only breastfed infants showed the expected increase in bifidobacteria and reduction in Proteobacteria and Clostridia. In the placebo group, both birth mode and antibiotic use were significantly associated with altered microbiota composition and function, particularly reduced Bifidobacterium abundance. In the probiotic group, the effects of antibiotics and birth mode were either completely eliminated or reduced.Conclusions: The results indicate that it is possible to correct undesired changes in microbiota composition and function caused by antibiotic treatments or caesarean birth by supplementing infants with a probiotic mixture together with at least partial breastfeeding.