Bacteria swim by rotating rigid helical flagella and periodically reorienting to follow environmental cues 1,2 . Despite the crucial role of reorientations, their underlying mechanism has remained unknown for most uni-flagellated bacteria 3,4 . Here, we report that uni-flagellated bacteria turn by exploiting a finely tuned buckling instability of their hook, the 100-nm-long structure at the base of their flagellar filament 5 . Combining high-speed video microscopy and mechanical stability theory, we demonstrate that reorientations occur 10 ms after the onset of forward swimming, when the hook undergoes compression, and that the associated hydrodynamic load triggers the buckling of the hook. Reducing the load on the hook below the buckling threshold by decreasing the swimming speed results in the suppression of reorientations, consistent with the critical nature of buckling. The mechanism of turning by buckling represents one of the smallest examples in nature of a biological function stemming from controlled mechanical failure 6 and reveals a new role for flexibility in biological materials, which may inspire new microrobotic solutions in medicine and engineering 7 .Flexibility is woven into every facet of living materials. At the cellular level, flexibility allows red blood cells to squeeze through capillaries 8 and DNA to stretch and twist to compensate for variability in binding site length 9 . At the organismal level, flexibility enhances structural performance, for example by enabling animal bones and plant branches to absorb mechanical energy 10 . Flexibility also underpins a host of dynamic life functions, including locomotion, reproduction and predation, by enabling the storage and swift release of elastic energy, a mechanism used by jumping froghoppers to escape predators 11 , by plants to catapult seeds for dispersal 12 , and by aquatic invertebrates to suck in prey 13 . An extreme consequence of flexibility is the occurrence of mechanical instabilities, such as buckling and fluttering, which in engineered systems are synonymous with failure 14 , but in natural systems can serve functional purpose. The biomechanical repertoire of organisms includes mechanical instabilities over a wide range of timescales, from the millisecond snap-buckling instabilities that allow Venus flytraps 15 and humming birds 16 to capture insects to the gradual buckling responsible for the wavy edges of leaves and flowers 17 .Flexible appendages are widely used by organisms for locomotion in fluids, from the flapping of bird and bat wings 18 , to the actuation of fish fins 19 , to the bending of sperm flagella 20 . Flexibility also plays a subtle role in the locomotion of bacteria with multiple flagella (peritrichous), such as Escherichia coli, which bundles its flagella together for propulsion (a run 1 ) by exploiting the compliance of the flagellum's base 21,22 . When one or more flagella leave the bundle following a change in the direction of rotation of their motor, the torque resulting from the unbundling, or from the asso...