Alnumycin A is an exceptional aromatic polyketide that contains a carbohydrate-like 4'-hydroxy-5'-hydroxymethyl-2',7'-dioxane moiety attached to the aglycone via a carbon-carbon bond. Recently, we have identified the D-ribose-5-phosphate origin of the dioxane unit and demonstrated that AlnA and AlnB are responsible for the overall C-ribosylation reaction. Here, we provide direct evidence that AlnA is a natural C-glycosynthase, which catalyzes the attachment of D-ribose-5-phosphate to prealnumycin by formation of the C(8)-C(1') bond as demonstrated by the structure of the intermediate alnumycin P. This compound is subsequently dephosphorylated by AlnB, an enzyme of the haloacid dehalogenase superfamily. Structure determination of the native trimeric AlnA to 2.1-Å resolution revealed a highly globular fold encompassing an α/β/α sandwich. The crystal structure of the complex with D-ribose-5-phosphate indicated that the phosphosugar is bound in the open-chain configuration. Identification of residues E29, K86, and K159 near the C-1 carbonyl of the ligand led us to propose that the carbon-carbon bond formation proceeds through a Michael-type addition. Determination of the crystal structure of the monomeric AlnB in the open conformation to 1.25-Å resolution showed that the protein consists of core and cap domains. Modeling of alnumycin P inside the cap domain positioned the phosphate group next to a Mg(2+) ion present at the junction of the domains. Mutagenesis data were consistent with the canonical reaction mechanism for this enzyme family revealing the importance of residues D15 and D17 for catalysis. The characterization of the prealnumycin C-ribosylation illustrates an alternative means for attachment of carbohydrates to natural products.