The lung microbiota is a complex community of microorganisms that colonize the respiratory tract of individuals from or even before birth. Although the lungs were traditionally believed to be sterile, recent research has shown that there is a diversity of bacterial species in the respiratory system. Knowledge about the lung microbiota in the newborn and its relationship with bacterial infections is of vital importance to understand the pathogenesis of respiratory diseases in neona-tal patients undergoing mechanical ventilation. In this article, the current evidence on the compo-sition of the lung microbiota in the newborn will be reviewed, as well as its role in the develop-ment of bacterial infections in mechanically ventilated neonates. Although advances in many as-pects of the neonatal intensive care unit care have significantly improved the survival of preterm infants, the diagnosis and treatment of ventilator-associated pneumonia has not progressed in recent decades. Avoiding dysbiosis caused by inappropriate use of antibiotics around birth, as well as avoiding intubation of patients or promoting early removal of endotracheal tubes are among the most important preventive measures for ventilator-associated pneumonia. The use of probiotics and prebiotics to prevent infectious, allergic or metabolic complications in the short or long term constitutes a very important field of research in perinatal medicine.