To understand mechanisms of DNA methylation in Helicobacter pylori, a human pathogen associated with peptic ulcer disease and gastric adenocarcinoma, we cloned a putative DNA methyltransferase gene, hpyIM. This gene contains a 990-bp open reading frame encoding a 329-amino-acid protein, M.HpyI. Sequence analysis revealed that M.HpyI was closely related to CATG-recognizing adenine DNA methyltransferases, including M.NlaIII in N. lactamica. hpyIM was present in all H. pylori strains tested. DNA from wild-type H. pylori strains was resistant to digestion by SphI and NlaIII, which recognize DNA at sites containing CATG, whereas their isogenic hpyIM mutants were susceptible, indicating lack of modification. Overexpression of hpyIM in Escherichia coli rendered DNA from these cells resistant to NlaIII digestion, confirming the role of hpyIM in modifying CATG sites. We conclude that hpyIM encodes a DNA methyltransferase, M.HpyI, that is well conserved among diverse H. pylori strains and that modifies H. pylori genomes at CATG sites.