O-Glycans of the human gastric mucosa show antimicrobial activity against the pathogenic bacterium Helicobacter pylori by inhibiting the bacterial cholesterol-alpha-glucosyltransferase (Kawakubo, M., Ito, Y., Okimura, Y., Kobayashi, M., Sakura, K., Kasama, S., Fukuda, M. N., Fukuda, M., Katsuyama, T., and Nakayama, J. (2004) Science 305, 1003-1006). This enzyme catalyzes the first step in the biosynthesis of four unusual glycolipids: cholesteryl-alpha-glucoside, cholesteryl-6'-O-acyl-alpha-glucoside, cholesteryl-6'-O-phosphatidyl-alpha-glucoside, and cholesteryl-6'-O-lysophosphatidyl-alpha-glucoside. Here we report the identification, cloning, and functional characterization of the cholesterol-alpha-glucosyltransferase from H. pylori. The hypothetical protein HP0421 from H. pylori belongs to the glycosyltransferase family 4 and shows similarities to some bacterial diacylglycerol-alpha-glucosyltransferases. Deletion of the HP0421 gene in H. pylori resulted in the loss of cholesteryl-alpha-glucoside and all of its three derivatives. Heterologous expression of HP0421 in the yeast Pichia pastoris led to the biosynthesis of ergosteryl-alpha-glucoside as demonstrated by purification of the lipid and subsequent structural analysis by nuclear magnetic resonance spectroscopy and mass spectrometry. In vitro enzyme assays were performed with cell-free homogenates obtained from cells of H. pylori or from transgenic Escherichia coli, which express HP0421. These assays revealed that the enzyme represents a membrane-bound, UDP-glucose-dependent cholesterol-alpha-glucosyltransferase.