Sinorhizobium meliloti, the nitrogen-fixing bacterial symbiont of Medicago spp. and other legumes, secretes a considerable amount of riboflavin. This precursor of the cofactors flavin mononucleotide and flavin adenine dinucleotide is a bioactive molecule that has a beneficial effect on plant growth. The ribBA gene of S. meliloti codes for a putative bifunctional enzyme with dihydroxybutanone phosphate synthase and guanosine triphosphate (GTP) cyclohydrolase II activities, catalyzing the initial steps of the riboflavin biosynthesis pathway. We show here that an in-frame deletion of ribBA does not cause riboflavin auxotrophy or affect the ability of S. meliloti to establish an effective symbiosis with the host plant but does affect the ability of the bacteria to secrete flavins, colonize host-plant roots, and compete for nodulation. A strain missing the RibBA protein retains considerable GTP cyclohydrolase II activity. Based on these results, we hypothesize that S. meliloti has two partly interchangeable modules for biosynthesis of riboflavin, one fulfilling the internal need for flavins in bacterial metabolism and the other producing riboflavin for secretion. Our data also indicate that bacteria-derived flavins play a role in communication between rhizobia and the legume host and that the RibBA protein is important in this communication process even though it is not essential for riboflavin biosynthesis and symbiosis.