In Gram-positive bacteria, CodY is an important regulator of genes whose expression changes under conditions of nutrient limitation. Bacillus anthracis CodY represses or activates directly or indirectly approximately 500 genes. Affinity purification of CodY-DNA complexes was used to identify the direct targets of CodY. Of the 389 DNA binding sites that were copurified with CodY, 132 sites were in or near the regulatory regions governing the expression of 197 CodY-controlled genes, indicating that CodY controls many other genes indirectly. CodY-binding specificity was verified using electrophoretic mobility shift and DNase I footprinting assays for three CodY targets. Analysis of the bound sequences led to the identification of a B. anthracis CodY-binding consensus motif that was found in 366 of the 389 affinity-purified DNA regions. Regulation of the expression of the two genes directly controlled by CodY, sap and eag, encoding the two surface layer (S-layer) proteins, was analyzed further by monitoring the expression of transcriptional lacZ reporter fusions in parental and codY mutant strains. CodY proved to be a direct repressor of both sap and eag expression. Since the expression of the S-layer genes is under the control of both CodY and PagR (a regulator that responds to bicarbonate), their expression levels respond to both metabolic and environmental cues.