Asymmetric division during sporulation by Bacillus subtilis generates a mother cell that undergoes a 5-h program of differentiation. The program is governed by a hierarchical cascade consisting of the transcription factors: σE, σK, GerE, GerR, and SpoIIID. The program consists of the activation and repression of 383 genes. The σE factor turns on 262 genes, including those for GerR and SpoIIID. These DNA-binding proteins downregulate almost half of the genes in the σE regulon. In addition, SpoIIID turns on ten genes, including genes involved in the appearance of σK. Next, σK activates 75 additional genes, including that for GerE. This DNA-binding protein, in turn, represses half of the genes that had been activated by σK while switching on a final set of 36 genes. Evidence is presented that repression and activation contribute to proper morphogenesis. The program of gene expression is driven forward by its hierarchical organization and by the repressive effects of the DNA-binding proteins. The logic of the program is that of a linked series of feed-forward loops, which generate successive pulses of gene transcription. Similar regulatory circuits could be a common feature of other systems of cellular differentiation.