Gene silencing in eukaryotes is associated with the formation of heterochromatin, a complex of proteins and DNA that block transcription. Heterochromatin is characterized by the methylation of cytosine nucleotides of the DNA, the methylation of histone H3 at lysine 9 (H3 Lys 9), and the specific binding of heterochromatin protein 1 (HP1) to methylated H3 Lys 9 (refs 1-7). Although the relationship between these chromatin modifications is generally unknown, in the fungus Neurospora crassa, DNA methylation acts genetically downstream of H3 Lys 9 methylation. Here we report the isolation of KRYPTONITE, a methyltransferase gene specific to H3 Lys 9, identified in a mutant screen for suppressors of gene silencing at the Arabidopsis thaliana SUPERMAN (SUP) locus. Loss-of-function kryptonite alleles resemble mutants in the DNA methyltransferase gene CHROMOMETHYLASE3 (CMT3), showing loss of cytosine methylation at sites of CpNpG trinucleotides (where N is A, C, G or T) and reactivation of endogenous retrotransposon sequences. We show that CMT3 interacts with an Arabidopsis homologue of HP1, which in turn interacts with methylated histones. These data suggest that CpNpG DNA methylation is controlled by histone H3 Lys 9 methylation, through interaction of CMT3 with methylated chromatin.