Unusual di- and trideoxysugars are often found on the O-antigens of Gram-negative bacteria, on the S-layers of Gram-positive bacteria, and on various natural products. One such sugar is 3-acetamido-3,6-dideoxy-D-glucose. A key step in its biosynthesis, catalyzed by a 3,4-ketoisomerase, is the conversion of thymidine diphosphate (dTDP)-4-keto-6-deoxyglucose to dTDP-3-keto-6-deoxyglucose. Here we report an X-ray analysis of a 3,4-ketoisomerase from Thermoanaerobacterium thermosaccharolyticum. For this investigation, the wild-type enzyme, referred to as QdtA, was crystallized in the presence of dTDP and its structure solved to 2.0-Å resolution. The dimeric enzyme adopts a three-dimensional architecture that is characteristic for proteins belonging to the cupin superfamily. In order to trap the dTDP-4-keto-6-deoxyglucose substrate into the active site, a mutant protein, H51N, was subsequently constructed, and the structure of this protein in complex with the dTDP-sugar ligand was solved to 1.9-Å resolution. Taken together, the structures suggest that His 51 serves as a catalytic base, that Tyr 37 likely functions as a catalytic acid, and that His 53 provides a proton shuttle between the C-3' hydroxyl and the C-4' keto group of the hexose. This study reports the first three-dimensional structure of a 3,4-ketoisomerase in complex with its dTDP-sugar substrate and thus sheds new molecular insight into this fascinating class of enzymes.