The bacterial flagellum is both a motor organelle and a protein export/assembly apparatus. It extends from the cytoplasm to the cell exterior. All the protein subunits of the external elements have to be exported. Export employs a type III pathway, also utilized for secretion of virulence factors. Six of the components of the export apparatus are integral membrane proteins and are believed to be located within the flagellar basal body. Three others are soluble: the ATPase that drives export, a regulator of the ATPase, and a general chaperone. Exported substrates diffuse down a narrow channel in the growing structure and assemble at the distal end, often with the help of a capping structure.