The bacterial flagellum is a motor whose assembly occurs in an ordered, stepwise fashion. However, the molecular details of this ordered assembly are poorly understood. Researchers used high-speed atomic force microscopy and biochemical assays to identify structural changes to a protein ring that acts as a gatekeeper for flagellum assembly. The study provides a working model for how the ordered assembly of the flagellum is achieved.