Several analogues of a hypothetical intermediate in the reaction catalyzed by lumazine synthase were synthesized and tested as inhibitors of both Bacillus subtilis lumazine synthase and Escherichia coli riboflavin synthase. The new compounds were designed by replacement of a two-carbon fragment of several 5-phosphonoalkyl-6-D-ribitylaminopyrimidinedione lumazine synthase inhibitors with an amide linkage that was envisioned as an analogue of a Schiff base moiety of a hypothetical intermediate in the enzyme-catalyzed reaction. The incorporation of the amide group led to an unexpected reversal in selectivity for inhibition of lumazine synthase vs riboflavin synthase. Whereas the parent 5-phosphonoalkyl-6-D-ribitylaminopyrimidinediones were lumazine synthase inhibitors and did not inhibit riboflavin synthase, the amide-containing derivatives inhibited riboflavin synthase and were only very weak or inactive as lumazine synthase inhibitors. Molecular modeling of inhibitor-lumazine synthase complexes did not reveal a structural basis for these unexpected findings. However, molecular modeling of one of the inhibitors with E. coli riboflavin synthase demonstrated that the active site of the enzyme could readily accommodate two ligand molecules.