The lipopolysaccharide (LPS) O-antigen of Yersinia enterocolitica serotype O:8 is formed by branched pentasaccharide repeat units that contain N-acetylgalactosamine (GalNAc), L-fucose (Fuc), D-galactose (Gal), D-mannose (Man), and 6-deoxy-D-gulose (6d-Gul). Its biosynthesis requires at least enzymes for the synthesis of each nucleoside diphosphate-activated sugar precursor; five glycosyltransferases, one for each sugar residue; a flippase (Wzx); and an O-antigen polymerase (Wzy). As this LPS shows a characteristic preferred O-antigen chain length, the presence of a chain length determinant protein (Wzz) is also expected. By targeted mutagenesis, we identify within the O-antigen gene cluster the genes encoding Wzy and Wzz. We also present genetic and biochemical evidence showing that the gene previously called galE encodes a UDP-N-acetylglucosamine-4-epimerase (EC 188.8.131.52) required for the biosynthesis of the first sugar of the O-unit. Accordingly, the gene was renamed gne. Gne also has some UDP-glucose-4-epimerase (EC 184.108.40.206) activity, as it restores the core production of an Escherichia coli K-12 galE mutant. The three-dimensional structure of Gne was modeled based on the crystal structure of E. coli GalE. Detailed structural comparison of the active sites of Gne and GalE revealed that additional space is required to accommodate the N-acetyl group in Gne and that this space is occupied by two Tyr residues in GalE whereas the corresponding residues present in Gne are Leu136 and Cys297. The Gne Leu136Tyr and Cys297Tyr variants completely lost the UDP-N-acetylglucosamine-4-epimerase activity while retaining the ability to complement the LPS phenotype of the E. coli galE mutant. Finally, we report that Yersinia Wzx has relaxed specificity for the translocated oligosaccharide, contrary to Wzy, which is strictly specific for the O-unit to be polymerized.