Histone methyltransferase that specifically trimethylates histone H3 to form H3K9me3. H3K9me3 marks chromatin regions for DNA methylation (PubMed:11713521, PubMed:12372305, PubMed:12679815, PubMed:12887903). Dim-5 recognizes Arg-8 to Gly-12 of the H3 tail with Thr-11 and Gly-12 being the most important specificity determinants, the recognition of whcih is important to distinguish H3K9 from H3K27 and H4K20 (PubMed:18215768). L-lysyl(9)-[histone H3] + 3 S-adenosyl-L-methionine = 3 H(+) + N(6),N(6),N(6)-trimethyl-L-lysyl(9)-[histone H3] + 3 S-adenosyl-L-homocysteine In the pre-SET domain, Cys residues bind 3 zinc ions that are arranged in a triangular cluster; some of these Cys residues contribute to the binding of two zinc ions within the cluster. Belongs to the class V-like SAM-binding methyltransferase superfamily. Histone-lysine methyltransferase family. Suvar3-9 subfamily.