BackgroundThe preterm microbiome is crucial to gut health and may contribute to necrotising enterocolitis (NEC), which represents the most significant pathology affecting preterm infants. From a cohort of 318 infants, <32 weeks gestation, we selected 7 infants who developed NEC (defined rigorously) and 28 matched controls. We performed detailed temporal bacterial (n = 641) and metabolomic (n = 75) profiling of the gut microbiome throughout the disease.ResultsA core community of Klebsiella, Escherichia, Staphyloccocus, and Enterococcus was present in all samples. Gut microbiota profiles grouped into six distinct clusters, termed preterm gut community types (PGCTs). Each PGCT reflected dominance by the core operational taxonomic units (OTUs), except of PGCT 6, which had high diversity and was dominant in bifidobacteria. While PGCTs 1–5 were present in infants prior to NEC diagnosis, PGCT 6 was comprised exclusively of healthy samples. NEC infants had significantly more PGCT transitions prior to diagnosis. Metabolomic profiling identified significant pathways associated with NEC onset, with metabolites involved in linoleate metabolism significantly associated with NEC diagnosis. Notably, metabolites associated with NEC were the lowest in PGCT 6.ConclusionsThis is the first study to integrate sequence and metabolomic stool analysis in preterm neonates, demonstrating that NEC does not have a uniform microbial signature. However, a diverse gut microbiome with a high abundance of bifidobacteria may protect preterm infants from disease. These results may inform biomarker development and improve understanding of gut-mediated mechanisms of NEC.Electronic supplementary materialThe online version of this article (doi:10.1186/s40168-016-0216-8) contains supplementary material, which is available to authorized users.