Endospore formation by Bacillus subtilis involves three differentiating cell types, the predivisional cell, the mother cell, and the forespore. Here we report the program of gene expression in the forespore, which is governed by the RNA polymerase sigma factors sigma(F) and sigma(G) and the DNA-binding proteins RsfA and SpoVT. The sigma(F) factor turns on about 48 genes, including the gene for RsfA, which represses a gene in the sigma(F) regulon, and the gene for sigma(G). The sigma(G) factor newly activates 81 genes, including the gene for SpoVT, which turns on (in nine cases) or stimulates (in 11 cases) the expression of 20 genes that had been turned on by sigma(G) and represses the expression of 27 others. The forespore line of gene expression consists of many genes that contribute to morphogenesis and to the resistance and germination properties of the spore but few that have metabolic functions. Comparative genomics reveals a core of genes in the sigma(F) and sigma(G) regulons that are widely conserved among endospore-forming species but are absent from closely related, but non-spore-forming Listeria spp. Two such partially conserved genes (ykoU and ykoV), which are members of the sigma(G) regulon, are shown to confer dry-heat resistance to dormant spores. The ykoV gene product, a homolog of the non-homologous end-joining protein Ku, is shown to associate with the nucleoid during germination. Extending earlier work on gene expression in the predivisional cell and the mother cell, we present an integrated overview of the entire program of sporulation gene expression.