To further our understanding of the evolution of bacterial regulatory networks, Taylor, Mulley et al. examined the mutational events required to restore motility in a mutant strain of Pseudomonas fluorescens that lacks flagella owing to the deletion of the master regulator of flagellar synthesis FleQ. The authors cultured the mutant in spreading motility medium, which imposes strong selective pressure to restore motility, and found that the mutated bacteria had regained flagella within 96 hours. This adaptation occurred in two steps: first, bacteria acquired mutations that increased the intracellular levels of phosphorylated NtrC, a distant homologue of FleQ that regulates the expression of genes involved in nitrogen uptake; then, bacteria acquired switch-of-function mutations in NtrC. These switch-of-function mutations resulted in NtrC-mediated regulation of flagellar genes, whereas regulation of nitrogen uptake was lost. Thus, natural selection can rapidly rewire complex regulatory networks to facilitate bacterial adaptation.