Operating the flagellar motor is impressive, but so is building it in the first place. Remember that the envelope of bacterial cells is a complicated multilayered barrier. The flagellar motor has about two dozen unique components, each present in many copies, embedded in every layer of the cell envelope. How can your cell get all hundred or more components (tens of thousands if you count the components of the filament) where they need to go? Making the feat even more impressive, the machine builds itself, assembling from the inside out. First the components associated with the inner membrane come together, forming an “export apparatus” which pumps subsequent components across the membrane to assemble in the periplasm and outer membrane (if the cell is a diderm). The energy for this process comes from an ATPase at the base of the machine. You can see a late stage in the assembly process in this Hylemonella gracilis cell. The final piece to be assembled (still missing here) is the flagellar filament, which continues the pattern of outward assembly; flagellin monomers travel through the hollow tube to take their places at the tip. Flagellar motors can also disassemble, for instance when the filament is broken (⇩), and cells may make many new flagella throughout their lifetime.
So the flagellar motor is not just a machine for motility; it is also a machine to secrete molecules outside the cell. Bacteria and archaea contain many such “secretion systems,” each specialized to transport specific macromolecules (e.g. DNA or a protein toxin) across cell envelopes–both their own and sometimes others. Secretion systems are classified by evolutionary relatedness; there are currently ~10 types recognized in bacteria, some of which are also present in archaea. The flagellar motor is an example of a type III secretion system. You will see another member of this family in Chapter 9, and examples of many other types in the rest of the book, starting in just a few pages.