Thiamin and riboflavin are precursors of essential coenzymes-thiamin pyrophosphate (TPP) and flavin mononucleotide (FMN)/flavin adenine dinucleotide (FAD), respectively. In Bacillus spp, genes responsible for thiamin and riboflavin biosynthesis are organized in tightly controllable operons. Here, we demonstrate that the feedback regulation of riboflavin and thiamin genes relies on a novel transcription attenuation mechanism. A unique feature of this mechanism is the formation of specific complexes between a conserved leader region of the cognate RNA and FMN or TPP. In each case, the complex allows the termination hairpin to form and interrupt transcription prematurely. Thus, sensing small molecules by nascent RNA controls transcription elongation of riboflavin and thiamin operons and possibly other bacterial operons as well.