Most motile bacteria move by the use of flagella. While the flagellar motor components have been identified, it remains unclear how they are assembled and activated. Researchers have now shown, through real-time imaging by high-speed atomic force microscopy, that the assembly of protein complexes into the motor proceeds through sodium ion-induced structural transitions.