Despite the extensive study of the biosynthesis of the complex molecule B12 (cobalamin), the mechanism by which the lower ligand 5,6-dimethylbenzimidazole (DMB) is formed has remained something of a mystery. However, recent work has identified and characterized a DMB-synthase (BluB) responsible for the oxygen-dependent, single enzyme conversion of FMN to DMB. In this work, we have identified BluB homologs from the aerobic purple, nonsulfur, photosynthetic bacterium Rhodobacter capsulatus and the aerobic soil bacterium Bacillus megaterium and have demonstrated DMB synthesis by the use of a novel complementation assay in which a B12 deficient strain, substituted with the precursor cobinamide is recovered either by the addition of DMB or by the recombinant expression of a bluB gene. The DMB-synthetic activity of the purified recombinant BluB enzymes was further confirmed in vitro by providing the enzyme with FMNH2 and oxygen and observing the formation of DMB by HPLC. The formation of a 4a-peroxyflavin intermediate, the first step in the oxygen dependent mechanism of DMB biosynthesis, is reported here and is the first intermediate in the enzyme catalysed reaction to be demonstrated experimentally to date. The identification and characterization of an FMN-binding protein found on the cobI operon of B. megaterium, CbiY, is also detailed, revealing an FMN-containing enzyme which is able to stabilize a blue flavin semiquinone upon reduction with a 1-electron donor.