Controller (C) proteins regulate the timing of the expression of restriction and modification (R-M) genes through a combination of positive and negative feedback circuits. A single dimer bound to the operator switches on transcription of the C-gene and the endonuclease gene; at higher concentrations, a second dimer bound adjacently switches off these genes. Here we report the first structure of a C protein-DNA operator complex, consisting of two C protein dimers bound to the native 35 bp operator sequence of the R-M system Esp1396I. The structure reveals a role for both direct and indirect DNA sequence recognition. The structure of the DNA in the complex is highly distorted, with severe compression of the minor groove resulting in a 50 degrees bend within each operator site, together with a large expansion of the major groove in the centre of the DNA sequence. Cooperative binding between dimers governs the concentration-dependent activation-repression switch and arises, in part, from the interaction of Glu25 and Arg35 side chains at the dimer-dimer interface. Competition between Arg35 and an equivalent residue of the sigma(70) subunit of RNA polymerase for the Glu25 site underpins the switch from activation to repression of the endonuclease gene.