Biosynthesis of the bacterial flagellum depends on a flagellar-specific type III secretion system (T3SS), a protein export machine homologous to the export machinery of the virulence-associated injectisome. Six cytoplasmic (FliH/I/J/G/M/N) and seven integral membrane proteins (FlhA/B FliF/O/P/Q/R) form the flagellar basal body and are involved in transport of flagellar building blocks across the inner membrane in a protein motive force-dependent manner. FlhA/B and FliP/Q/R are conserved in all T3SS and form the export gate complex. FliO is absent in some T3SS and was presumed to regulate FliP during flagellum assembly. However, the molecular function of FliO and how the large, multi-component transmembrane export gate complex assembles in a coordinated manner remained enigmatic. Here, we demonstrate that FliO protects FliP from proteolytic degradation and promotes formation of FliP-containing subcomplexes during the first step of core export apparatus assembly. We further reveal the sub-cellular localization of FliO by dSTORM superresolution microscopy and show that FliO is not part of the assembled flagellar basal body. In summary, our results suggest that FliO functions as a novel, flagellar T3SS-specific chaperone, which facilitates quality control and productive assembly of the core T3SS export machinery.