We investigated the function and transcriptional regulation of ywcG. The protein is essential for Bacillus subtilis. Biochemical characterization of the protein revealed that it is an FMN-containing NADPH oxidase. ywcG is transcribed throughout the whole life cycle of B. subtilis. The start point of transcription is preceded by potential promoter sequences for σA, σB and σD. A boost in transcription occurs at the beginning of stationary phase in complex media containing glutamate and glucose. The induction of transcription at the beginning of stationary phase needs the activity of a different alternative σ-factor σD. ywcG is, therefore, the first gene with a putative role in energy metabolism from B. subtilis that is transcribed in a σD-dependent fashion, but its regulation is unique and the reverse of that described for all other σD-dependent genes.