Histone methyltransferase which is required for the mono- and dimethylation of 'Lys-9' of histone H3 (PubMed:20107519, PubMed:22939621). This increases the efficiency of set-25-mediated trimethylation of histone H3 'Lys-9' (PubMed:22939621). Involved in the transcriptional repression of lin-3 which is required for the negative regulation of vulval cell fate specification during postembryonic development (PubMed:17634190). Has a role in blocking checkpoint signaling and mediating the transcriptional silencing of meiotic sex chromosome inactivation; a mechanism which enables checkpoint proteins to distinguish between the partnerless male X chromosome and asynapsed chromosomes thereby shielding the lone X from inappropriate activation of an apoptotic program (PubMed:21909284). Operates redundantly with set-25 to position chromatin at the nuclear periphery (PubMed:22939621). Required for small-RNA-induced H3K9 methylation (PubMed:26365259). Together with set-25, protects and stabilizes repeat-rich genomic regions by suppressing transcription-induced replication stress through methylation of H3K9 (PubMed:27668659). Together with spr-5, required for transgenerational fertility (PubMed:24685137). N(6)-methyl-L-lysyl(9)-[histone H3] + S-adenosyl-L-methionine = H(+) + N(6),N(6)-dimethyl-L-lysyl(9)-[histone H3] + S-adenosyl-L-homocysteine L-lysyl(9)-[histone H3] + S-adenosyl-L-methionine = H(+) + N(6)-methyl-L-lysyl(9)-[histone H3] + 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. Induced vulval precursor cells in the absence of lin-15A (PubMed:15990876). Multi-vulval phenotype is apparent when grown at 24.5 degrees Celsius in the absence of lin-61 and when grown at 20 degrees Celsius in the absence of hpl-2 or met-1 (PubMed:17634190, PubMed:21437264). Reduced lamin interaction of chromosome arms in the absence of set-25 (PubMed:22939621). Increased apoptosis and increased occurrence of the recombination checkpoint XO germ lines (PubMed:21909284). High incidence of endomitotic oocytes (PubMed:20107519). In spr-5 null mutants, accelerates the progressive sterility over generations, which is seen in spr-5 mutants with complete sterility achieved by generation 2 (PubMed:24685137). Belongs to the class V-like SAM-binding methyltransferase superfamily.