Flagellated bacteria swim up gradients of chemical attractants by modulating the direction of rotation of their flagellar motors, but how this switching mechanism works is not understood. Here we show ...