Abstract: Bacterial genomes are being sequenced at an exponentially increasing rate, but our inability to decipher their transcriptional wiring limits our ability to derive new biology from these sequences. De novo determination of regulatory interactions requires accurate prediction of regulators' DNA binding and precise determination of biologically significant binding sites. Here we address these challenges by solving the DNA-specificity code of extracytoplasmic function sigma factors (ECF σs), a major family of bacterial regulators, and determining their putative regulons. We generated an aligned collection of ECF σs and their promoters by leveraging the autoregulatory nature of ECF σs as a means of promoter discovery and analyzed it to identify and characterize the conserved amino acid-nucleotide interactions that determine promoter specificity. This enabled de novo prediction of ECF σ specificity, which we combined with a statistically rigorous phylogenetic footprinting pipeline based on precomputed orthologs to predict the direct targets of ∼67% of ECF σs. This global survey indicated that some ECF σs are conserved global regulators controlling many genes throughout the genome, which are important under many conditions, while others are local regulators, controlling a few closely linked genes in response to specific stimuli in select species. This analysis reveals important organizing principles of bacterial gene regulation and presents a conceptual and computational framework for deciphering gene regulatory networks.