Background
Klebsiella pneumoniae is a gram-negative bacterial species capable of occupying a broad range of environmental and clinical habitats. Known as an opportunistic pathogen, it has recently become a major causative agent of clinical infections worldwide. Despite growing knowledge about the highly diverse population of K. pneumoniae, the evolution and clinical significance of environmental K. pneumoniae, as well as the relationship between clinical and environmental K. pneumoniae, are poorly defined.MethodsWe isolated and sequenced K. pneumoniae from in-patients in a single hospital in Thailand, as well as hospital sewage, and surrounding canals and farms within a 20-km radius.ResultsPhylogenetic analysis of 77 K. pneumoniae (48 clinical and 29 non-clinical isolates) demonstrated that the two groups were intermixed throughout the tree and in some cases resided in the same clade, suggesting recent divergence from a common ancestor. Phylogenetic comparison of the 77 Thai genomes with 286 K. pneumoniae from a global collection showed that Thai isolates were closely related to the clinical sub-population of the global collection, indicating that Thai clinical isolates belonged to globally circulating lineages. Dating of four Thai K. pneumoniae clades indicated that they emerged between 50 and 150 years ago. Despite their phylogenetic relatedness, virulence factors and β-lactamase resistance genes were more numerous in clinical than in environmental isolates. Our results indicate that clinical and environmental K. pneumoniae are closely related, but that hospitals may select for isolates with a more resistant and virulent genotype.ConclusionsThese findings highlight the clinical relevance of environmental K. pneumoniae isolates.Electronic supplementary materialThe online version of this article (doi:10.1186/s13073-017-0397-1) contains supplementary material, which is available to authorized users.