The synthesis of 5,6-dimethylbenzimidazole (DMB), the lower ligand of coenzyme B12, has remained elusive. We report in vitro and in vivo evidence that the BluB protein of the photosynthetic bacterium Rhodospirillum rubrum is necessary and sufficient for catalysis of the O2-dependent conversion of FMNH2 to DMB. The product of the reaction (DMB) was isolated by using reverse-phase high-pressure liquid chromatography, and its identity was established by UV-visible spectroscopy and MS. No metals were detected in homogeneous preparations of BluB, and the enzyme did not affect DMB synthesis from 4,5-dimethylphenylenediamine and ribose-5-phosphate. The effect of the lack of bluB function in R. rubrum was reflected by the impaired ability of a ΔbluB strain to convert Mg-protoporphyrin IX monomethyl ester (MPE) into protochlorophylide, a reaction of the bacteriochlorophyll biosynthetic pathway catalyzed by the MPE-cyclase enzyme present in this bacterium (BchE, EC 22.214.171.124), a predicted coenzyme B12-dependent enzyme. The growth defect of the ΔbluB strain observed under anoxic photoheterotrophic conditions was corrected by the addition of DMB or B12 to the culture medium or by introducing into the strain a plasmid encoding the wild-type allele of bluB. The findings reported here close an important gap in our understanding of the enzymology of the assembly of coenzyme B12. © 2007 by The National Academy of Sciences of the USA.