Methanopterin is a folate analog involved in the C1 metabolism of methanogenic archaea, sulfate-reducing archaea, and methylotrophic bacteria. Although a pathway for methanopterin biosynthesis has been described in methanogens, little is known about the enzymes and genes involved in the biosynthetic pathway. The enzyme beta-ribofuranosylaminobenzene 5'-phosphate synthase (beta-RFAP synthase) catalyzes the first unique step to be identified in the pathway of methanopterin biosynthesis, namely, the condensation of p-aminobenzoic acid with phosphoribosylpyrophosphate to form beta-RFAP, CO2, and inorganic pyrophosphate. The enzyme catalyzing this reaction has not been purified to homogeneity, and the gene encoding beta-RFAP synthase has not yet been identified. In the present work, we report on the purification to homogeneity of beta-RFAP synthase. The enzyme was purified from the methane-producing archaeon Methanosarcina thermophila, and the N-terminal sequence of the protein was used to identify corresponding genes from several archaea, including the methanogen Methanococcus jannaschii and the sulfate-reducing archaeon Archaeoglobus fulgidus. The putative beta-RFAP synthase gene from A. fulgidus was expressed in Escherichia coli, and the enzymatic activity of the recombinant gene product was verified. A BLAST search using the deduced amino acid sequence of the beta-RFAP synthase gene identified homologs in additional archaea and in a gene cluster required for C1 metabolism by the bacterium Methylobacterium extorquens. The identification of a gene encoding a potential beta-RFAP synthase in M. extorquens is the first report of a putative methanopterin biosynthetic gene found in the Bacteria and provides evidence that the pathways of methanopterin biosynthesis in Bacteria and Archaea are similar.