The bacterial flagellum is a complex self-assembling nanomachine that contains its own type III protein export apparatus. Upon completion of early flagellar structure, this apparatus switches substrate specificity to export late structural subunits, thereby coupling sequential flagellar gene expression with flagellar assembly. The switch is achieved by a conformational change of the export apparatus component FlhB driven by the flagellar hook-length control protein FliK. Two basic models of FliK- and FlhB-based switching are currently being pursued, together with the investigation of another factor, Flk, which prevents premature export of late substrates. Here, we review in detail each of these three export switch components and present the current understanding of how they work in concert in the making of a flagellum.