Metabolite glycosylation is affected by three classes of enzymes: nucleotidylyltransferases, which activate sugars as nucleotide diphospho-derivatives, intermediate sugar-modifying enzymes and glycosyltransferases, which transfer the final derivatized activated sugars to aglycon substrates. One of the first crystal structures of an enzyme responsible for the first step in this cascade, alpha-D-glucopyranosyl phosphate thymidylyltransferase (Ep) from Salmonella, in complex with product (UDP-Glc) and substrate (dTTP) is reported at 2.0 A and 2.1 A resolution, respectively. These structures, in conjunction with the kinetic characterization of Ep, clarify the catalytic mechanism of this important enzyme class. Structure-based engineering of Ep produced modified enzymes capable of utilizing 'unnatural' sugar phosphates not accepted by wild type Ep. The demonstrated ability to alter nucleotidylyltransferase specificity by design is an integral component of in vitro glycosylation systems developed for the production of diverse glycorandomized libraries.