The hydride carrier coenzyme F(420) contains the unusual chromophore 7,8-didemethyl-8-hydroxy-5-deazariboflavin (FO). Microbes that generate F(420) produce this FO moiety using a pyrimidine intermediate from riboflavin biosynthesis and the 4-hydroxyphenylpyruvate precursor of tyrosine. The fbiC gene, cloned from Mycobacterium smegmatis, encodes the bifunctional FO synthase. Expression of this protein in Escherichia coli caused the host cells to produce FO during growth, and activated cell-free extracts catalyze FO biosynthesis in vitro. FO synthase in the methanogenic euryarchaeon Methanocaldococcus jannaschii comprises two proteins encoded by cofG (MJ0446) and cofH (MJ1431). Both subunits were required for FO biosynthesis in vivo and in vitro. Cyanobacterial genomes encode homologs of both genes, which are used to produce the coenzyme for FO-dependent DNA photolyases. A molecular phylogeny of the paralogous cofG and cofH genes is consistent with the genes being vertically inherited within the euryarchaeal, cyanobacterial, and actinomycetal lineages. Ancestors of the cyanobacteria and actinomycetes must have acquired the two genes, which subsequently fused in actinomycetes. Both CofG and CofH have putative radical S-adenosylmethionine binding motifs, and pre-incubation with S-adenosylmethionine, Fe(2+), sulfide, and dithionite stimulates FO production. Therefore a radical reaction mechanism is proposed for the biosynthesis of FO.