BackgroundAntibiotic resistance genes (ARGs) are widespread but cause problems only when present in pathogens. Environments where selection and transmission of antibiotic resistance frequently take place are likely to be characterized by high abundance and diversity of horizontally transferable ARGs. Large-scale quantitative data on ARGs is, however, lacking for most types of environments, including humans and animals, as is data on resistance genes to potential co-selective agents, such as biocides and metals. This paucity prevents efficient identification of risk environments.ResultsWe provide a comprehensive characterization of resistance genes, mobile genetic elements (MGEs) and bacterial taxonomic compositions for 864 metagenomes from humans (n = 350), animals (n = 145) and external environments (n = 369), all deeply sequenced using Illumina technology. Environment types showed clear differences in both resistance profiles and bacterial community compositions. Human and animal microbial communities were characterized by limited taxonomic diversity and low abundance and diversity of biocide/metal resistance genes and MGEs but a relatively high abundance of ARGs. In contrast, external environments showed consistently high taxonomic diversity which in turn was linked to high diversity of both biocide/metal resistance genes and MGEs. Water, sediment and soil generally carried low relative abundance and few varieties of known ARGs, whereas wastewater/sludge was on par with the human gut. The environments with the largest relative abundance and/or diversity of ARGs, including genes encoding resistance to last resort antibiotics, were those subjected to industrial antibiotic pollution and a limited set of deeply sequenced air samples from a Beijing smog event.ConclusionsOur study identifies air and antibiotic-polluted environments as under-investigated transmission routes and reservoirs for antibiotic resistance. The high taxonomic and genetic diversity of external environments supports the hypothesis that these also form vast sources of unknown resistance genes, with potential to be transferred to pathogens in the future.Electronic supplementary materialThe online version of this article (doi:10.1186/s40168-016-0199-5) contains supplementary material, which is available to authorized users.