In prokaryotes, the major role of DNA methylation is to protect host DNA against degradation by restriction enzymes. In eukaryotes, DNA methylation has been implicated in the control of several cellular processes, including differentiation, gene regulation, and embryonic development. Structural work on HhaI DNA methyltransferase demonstrates that the substrate nucleotide is completely flipped out of the helix during the modification reaction and has provided much insight into the enzymatic properties of S-adenosyl-L-methionine (SAM)-dependent DNA-modifying enzymes. Structural comparison of three enzymes, HhaI C5-cytosine methyltransferase, TaqI N6-adenine methyltransferase, and catechol O-methyltransferase, reveals a striking similarity in protein folding and indicates that many SAM-dependent methyltransferases have a common catalytic-domain structure. This feature permits the prediction of tertiary structure for other DNA, RNA, protein, and small-molecule methyltransferases from their amino acid sequences, including the eukaryotic CpG methyltransferases.