Genes contributing to riboflavin production in Sinorhizobium meliloti were identified, and bacterial strains that overproduce this vitamin were constructed to characterize how additional riboflavin affects interactions between alfalfa (Medicago sativa) and S. meliloti. Riboflavin-synthesis genes in S. meliloti were found in three separate linkage groups and designated as ribBA, ribDribC, and ribH for their similarities to Escherichia coli genes. The ribBA and ribC loci complemented corresponding E. coli rib mutants. S. meliloti cells containing extra copies of ribBA released 10 to 20% more riboflavin than a control strain but grew at similar rates in a defined medium lacking riboflavin. Cells carrying extra copies of ribBA colonized roots to densities that were 55% higher than that of a control strain. No effect of extra rib genes was detected on alfalfa grown in the absence or presence of combined N. These results support the importance of extracellular riboflavin for alfalfa root colonization by S. meliloti and are consistent with the hypothesis that this molecule benefits bacteria indirectly through an effect on the plant.