The transcription factor Rex has been implicated in regulation of the expression of genes important for fermentative growth and for growth under conditions of low oxygen tension in several Gram-positive bacteria. Rex senses the redox poise of the cell through changes in the NADH/NAD(+) ratio. The crystal structures of two essentially identical Rex proteins, from Thermus aquaticus and T. thermophilus, have previously been determined in complex with NADH. Here we present the crystal structure of the Rex protein from Bacillus subtilis, as well as extensive studies of its affinity for nucleotides and DNA, using surface plasmon resonance, isothermal titration calorimetry and electrophoretic mobility shift assays. We show that Rex has a very high affinity for NADH but that its affinity for NAD(+) is 20 000 times lower. However the NAD(+) affinity is increased by a factor of 30 upon DNA binding, suggesting that there is a positive allosteric coupling between DNA binding and NAD(+) binding. The crystal structures of two pseudo-apo forms (from crystals soaked with NADH and co-crystallized with ATP) show a very different conformation from the previously determined Rex:NADH complexes, in which the N-terminal domains are splayed away from the dimer core. A mechanism is proposed whereby conformational changes in a C-terminal domain-swapped helix mediate the transition from a flexible DNA-binding form to a locked NADH-bound form incapable of binding DNA.