Histone methyltransferase that specifically di- and trimethylates 'Lys-4' of histone H3 at all developmental stages and in adult germ cells (PubMed:21527717, PubMed:20555324). H3 'Lys-4' methylation represents a specific tag for epigenetic transcriptional activation (PubMed:21527717). Implicated in the epigenetic inheritance of lifespan over several generations (PubMed:22012258). Acts in the germline to limit the longevity of the soma, probably by regulating a lipid metabolism pathway that signals from the germline to the intestine, thereby preventing accumulation of mono-unsaturated fatty acids (PubMed:20555324, PubMed:28379943). Methylation in the germline is required for germline development and fertility, possibly by ensuring genome stability (PubMed:21527717, PubMed:12242227). May act redundantly with mes-3 and mes-4 proteins in the development of a fertile germline (PubMed:11729150). Required for RNAi (PubMed:17967446). Functions as an antagonist of hpl-1 and hpl-2 activity in growth and somatic gonad development (PubMed:17967446). Cooperates with jmjd-3.1 and egl-27 to ensure robust transdifferentiation of the Y rectal cell to the PDA motor neuron during larval development (PubMed:25124442). N(6)-methyl-L-lysyl(4)-[histone H3] + S-adenosyl-L-methionine = H(+) + N(6),N(6)-dimethyl-L-lysyl(4)-[histone H3] + S-adenosyl-L-homocysteine N(6),N(6)-dimethyl-L-lysyl(4)-[histone H3] + S-adenosyl-L-methionine = H(+) + N(6),N(6),N(6)-trimethyl-L-lysyl(4)-[histone H3] + S-adenosyl-L-homocysteine Component of the SET2 complex (also known as the SET1/COMPASS complex), which contains at least set-2, swd-2.1, cfp-1, rbbp-5, wdr-5.1, dpy-30 and ash-2. Localized in mitotic and mid-late-stage meiotic nuclei but is undetectable in early pachytene nuclei. Expressed in all cells of embryo. In L1 larva, it is predominantly expressed in Z2 and Z3 primordial germ cells. In adults, it is predominantly expressed in the germline. Expressed throughout embryogenesis. RNAi-mediated knockdown results in disruption of invariant Y-to-PDA transdifferentiation (PubMed:25124442). Results in decreased trimethylation at 'Lys-4' of histone H3 (PubMed:20555324). Leads to an extension of lifespan (PubMed:20555324). Leads to a deregulation of fat metabolism and to an enrichment of mono-unsaturated fatty acids (PubMed:28379943). Belongs to the class V-like SAM-binding methyltransferase superfamily.