Growing cells of Bacillus subtilis are a bistable mixture of individual motile cells in which genes for daughter cell separation and motility are ON, and chains of sessile cells in which these genes are OFF. How this ON/OFF switch is controlled has been mysterious. Here we report that a complex of the SinR and SlrR proteins binds to and represses genes involved in cell separation and motility. We also report that SinR and SlrR constitute a double-negative feedback loop in which SinR represses the gene for SlrR (slrR), and, by binding to (titrating) SinR, SlrR prevents SinR from repressing slrR. Thus, SlrR indirectly derepresses its own gene, creating a self-reinforcing loop. Finally, we show that, once activated, the loop remains locked in a high SlrR state in which cell separation and motility genes are OFF for extended periods of time. SinR and SlrR constitute an epigenetic switch for controlling genes involved in cell separation and motility.