Flagellin is the subunit which polymerizes to form the filaments of bacterial flagella. Assembly into flagella requires FliW (PubMed:16936039). Acts as a homeostatic autoinhibitory regulator to control its own cytoplasmic levels. Partner switching by flagellin between FliW and CsrA provides a flagellar assembly checkpoint to tightly control the timing of flagellin synthesis. Flagellin binds to assembly factor FliW, freeing translation regulator CsrA to repress translation of the flagellin mRNA. When the flagellar hook is assembled flagellin is secreted, depleting intracellular flagellin, which frees FliW to interact with CsrA. This derepresses flagellin translation and provides protein for flagellar assembly. Once the flagellar filament is completed cytoplasmic flagellin levels rise and CsrA translation repression of flagellin reinitiates (PubMed:21895793). Interacts with FliW in a 1:1 complex (PubMed:16936039, PubMed:21895793). Forms a 3-way complex of Hag, FliS and FliW, in which Flis and FliW do not directly interact (PubMed:23144244). Cell wall localization shown in PubMed:11987133. Under positive control of SigD (PubMed:11987133). Repressed by CsrA; repression is greater in the 1A96 than 168 genetic background and higher in minimal than rich medium (PubMed:17555441). Belongs to the bacterial flagellin family.