a, Phylogenetic tree of E. faecalis strains of the BBS (n = 282 strains, isolated from 269 faecal samples of 160 subjects). The midpoint-rooted maximum-likelihood phylogeny is based on SNPs in 1,827 core genes. Five major lineages (>10 representatives in strains of the BBS; ST179, n = 60; ST16, n = 30, ST40, n = 27; ST30, n = 21; and ST191, n = 14) were identified within UK hospital collections, distributed across three hospitals in this study and with no phylogroup limited to any single hospital. Solid lines between strains indicate intra-subject strain persistence (n = 92 strains in 67 babies). Dashed lines indicate phylogenetically distinct strains that were isolated from longitudinal samples (n = 18) or mother–baby paired samples (yellow, n = 10); arrows indicate the direction of the potential transmission (early-to-later or mother-to-baby). In situations in which multiple identical strains (no SNP difference in species core genome) were isolated from the same faecal sample, only one representative strain was included in the species phylogenetic tree (total number of strains, n = 356). b–e, Prevalence of virulence-related genes (b, c) and AMR-related genes (grouped by antibiotic class) (d, e) detected in E. faecalis strains of the BBS. Significance results shown are coloured according to the group with higher frequency of detected genes, by two-sided Fisher’s exact test between the groups of the public gut microbiota strains (n = 28) versus strains of the BBS (n = 356), and strains of the BBS versus the epidemic strains in UK hospitals (n = 89; tree branches coloured blue in Fig. 4c). ****P < 0.0001, ***P < 0.001, **P < 0.01, *P < 0.05. Virulence-related genes: asa1, EF0149, EF0485 and prgB, aggregation substance; esp, enterococcal surface protein; genes that encode exoenzymes: gelE, gelatinase; EF0818 and EF3023, hyaluronidase (spreading factor); sprE, serine protease; and fsr, quorum sensing system; toxin-encoding gene: cyl, cytolysin. Genes detected across all isolates (dfrE, efrA, efrB, emeA and lsaA) are not shown. AMR-related genes: Am, aminoglycosides (aph3″-III, ant(6)-Ia, aph(2'') and str); Chlor, chloramphenicol (catA); Linc, lincosamides (lnuB); MLSB, macrolide, lincosamide and streptogramin B (ermB or ermT); Tet, tetracycline (tetL, tetM, tetO and tetS); Trim, trimethoprim (dfrC, dfrD, dfrF or dfrG); and Vanc, vancomycin.