The bacterial flagellum is a motility organelle that enables bacteria to swim and is composed of more than 30 different proteins. Researchers have long sought to understand how this complex nanomachine self-assembles from many parts in the correct order and at the correct positions.