Introduction: Microbiome imbalance could be associated with the occurrence of acute exacerbation of idiopathic pulmonary fibrosis (AE-IPF). Aims: To investigate the association between oral bacterial flora and the occurrence of AE-IPF. Methods: We have prospectively collected 142 patients with IPF, 264 healthy subjects and 31 patients with bacterial pneumonia. Baseline serum antibody levels against 17 bacteria were measured by ELISA. The correlations between these values and the occurrence of AE-IPF were evaluated. An imbalance in the number of bacteria was defined as the number of pathogenic bacteria minus that of inhibitory bacteria. Results: We have identified 7 bacteria potentially promoting AE-IPF (Porphyromonas type I, III, IV, V, Helicobacter, Campylobacter, and Tannerella) and 3 bacteria potentially inhibiting AE-IPF (Prevotella, Fusobacterium, and Aggregatibacter). The baseline number of pathogenic bacteria was increased in patients with AE-IPF compared with those without AE-IPF (4.1±2.3 vs 2.9±2.4, p=0.0049), whereas the number of inhibitory bacteria was decreased (1.1±1.1 vs 1.6±1.1, p=0.007). The imbalance in the number of bacteria was increased in patients with AE-IPF (3.0±2.2 vs 1.3±2.2, p<0.0001). The imbalance in the number of bacteria in the Japanese cohort was higher than that in the German cohort (2.1±2.1 vs 0.5±1.9, p<0.0001). In the multivariate analysis, the imbalance in the number of bacteria and the Japanese ethnicity were independently associated with the occurrence of AE-IPF (HR 1.23; p=0.015; HR 4.37, p=0.0002). Conclusions: The imbalance of pathogenic and inhibitory bacteria was associated with the occurrence of AE-IPF.