An open reading frame optimized for expression of 6,7-dimethyl-8-ribityl-lumazine synthase of the hyperthermophilic bacterium Aquifex aeolicus in Escherichia coli was synthesized and expressed in a recombinant E. coli strain to a level of around 15 %. The recombinant protein was purified by heat-treatment and gel-filtration. The protein was crystallized in the cubic space group I23 with the cell dimensions a = b = c = 180.8 A, and diffraction data were collected to 1.6 A resolution. The structure was solved by molecular replacement using lumazine synthase from Bacillus subtilis as search model. The structure of the A. aeolicus enzyme was refined to a resolution of 1.6 A. The spherical protein consists of 60 identical subunits with strict icosahedral 532 symmetry. The subunit fold is closely related to that of the B. subtilis enzyme (rmsd 0.80 A). The extremely thermostable lumazine synthase from A. aeolicus has a melting temperature of 119.9 degrees C. Compared to other icosahedral and pentameric lumazine synthases, the A. aeolicus enzyme has the largest accessible surface presented by charged residues and the smallest surface presented by hydrophobic residues. It also has the largest number of ion-pairs per subunit. Two ion-pair networks involving two, respectively three, stacking arginine residues assume a distinct role in linking adjacent subunits. The findings indicate the influence of the optimization of hydrophobic and ionic contacts in gaining thermostability.