Key Points The anatomical development and maturation of the human respiratory tract is a complex multistage process that occurs not only in prenatal life but also postnatally. This maturation process depends, in part, on exposure to microbial and environmental triggers, and results in a highly specialized organ system that contains several distinct niches, each of which is subjected to specific microbial, cellular and physiological gradients. The respiratory microbiome during early life is dynamic and its development is affected by a range of host and environmental factors, including mode of birth, feeding type, antibiotic treatment and crowding conditions, such as the presence of siblings and day-care attendance. The upper respiratory tract is colonized by specialized resident bacterial, viral and fungal assemblages, which presumably prevent potential pathogens from overgrowing and disseminating towards the lungs, thereby functioning as gatekeepers to respiratory health. The upper respiratory tract is the primary source of the lung microbiome. In healthy individuals, the lung microbiome seems to largely consist of transient microorganisms and its composition is determined by the balance between microbial immigration and elimination. Next-generation sequencing has identified intricate interbacterial association networks that comprise true mutualistic, commensal or antagonistic direct or indirect relationships. Alternatively, bacterial co-occurrence seems to be driven by host and environmental factors, as well as by interactions with viruses and fungi. The respiratory microbiome provides cues to the host immune system that seem to be vital for immune training, organogenesis and the maintenance of immune tolerance. Increasing evidence supports the existence of a window of opportunity early in life, during which adequate microbiota sensing is essential for immune maturation and consecutive respiratory health. Future studies should focus on large-scale, multidisciplinary holistic approaches and adequately account for host and environmental factors. Associations that are identified by these studies can then be corroborated in reductionist surveys; for example, by using in vitro or animal studies. Supplementary information The online version of this article (doi:10.1038/nrmicro.2017.14) contains supplementary material, which is available to authorized users.