Lumazine synthase catalyzes the penultimate step in the synthesis of riboflavin in plants, fungi, and microorganisms. The enzyme displays two quaternary structures, the pentameric forms in yeast and fungi and the 60-meric icosahedral capsids in plants and bacteria. To elucidate the structural features that might be responsible for differences in assembly, we have determined the crystal structures of lumazine synthase, complexed with the inhibitor 5-nitroso-6-ribitylamino-2,4-pyrimidinedione, from spinach and the fungus Magnaporthe grisea to 3.3 and 3.1 A resolution, respectively. The overall structure of the subunit and the mode of inhibitor binding are very similar in these enzyme species. The core of the subunit consists of a four-stranded parallel beta-sheet sandwiched between two helices on one side and three helices on the other. The packing of the five subunits in the pentameric M. grisea lumazine synthase is very similar to the packing in the pentameric substructures in the icosahedral capsid of the plant enzyme. Two structural features can be correlated to the differences in assembly. In the plant enzyme, the N-terminal beta-strand interacts with the beta-sheet of the adjacent subunit, thus extending the sheet from four to five strands. In fungal lumazine synthase, an insertion of two residues after strand beta1 results in a completely different orientation of this part of the polypeptide chain and this conformational difference prevents proper packing of the subunits at the trimer interface in the icosahedron. In the spinach enzyme, the beta-hairpin connecting helices alpha4 and alpha5 participates in the packing at the trimer interface of the icosahedron. Another insertion of two residues at this position of the polypeptide chain in the fungal enzyme disrupts the hydrogen bonding in the hairpin, and the resulting change in conformation of this loop also interferes with proper intrasubunit contacts at the trimer interface.