The refined crystal structures of HhaI methyltransferase complexed with cognate unmethylated or methylated DNA together with S-adenosyl-L-homocysteine, along with the previously-solved binary and covalent ternary structures, offer a detailed picture of the active site at individual stages throughout the reaction cycle. This picture supports and extends a proposed mechanism for C5-cytosine methylation that may be general for the whole family of C5-cytosine methyltransferases. The structures of the two new complexes have been refined to crystallographic R-factors of 0.189 and 0.178, respectively, at 2.7 A resolution. We observe that both unmethylated 2'-deoxycytidine and 5-methyl-2'-deoxycytidine flip out of the DNA helix and fit into the active site of the enzyme. The catalytic sulfur atom of Cys81 interacts strongly with C6. The C5 methyl group of the flipped 5-methyl-2'-deoxycytidine is bent approximately 50 degrees out of the plane of the cytosine ring and towards the sulfur atom of S-adenosyl-L-homocysteine. This unusual position is probably due to partial sp3 character at C5 and C6 and to steric effects of the conserved amino acid residues Pro80 and Cys81. Two water molecules are held near the hydrophobic edge (C5 and C6) of the flipped cytosine by two conserved amino acid residues (Gln82 and Asn304) and the phosphoryl oxygen atom of the phosphate group 3' to the flipped nucleotide, and one of them may serve as the general base for eliminating the proton from C5. Protonation of the cytosine N3 during the methylation reaction may involve Glu119, which itself might be protonated via a water-mediated interaction between the terminal carboxyl group of Glu119 and the amino group of the methionine moiety of S-adenosyl-L-methionine. The cofactor thus plays two key roles in the reaction.