The bacterial flagellum and the virulence-associated injectisome are complex, structurally related nanomachines that bacteria use for locomotion or the translocation of virulence factors into eukaryotic host cells. The assembly of both structures and the transfer of extracellular proteins is mediated by a unique, multicomponent transport apparatus, the type III secretion system. Here, we discuss the significant progress that has been made in recent years in the visualization and functional characterization of many components of the type III secretion system, the structure of the bacterial flagellum, and the injectisome complex.