Endoribonuclease that plays a central role during spermatogenesis by repressing transposable elements and preventing their mobilization, which is essential for the germline integrity (PubMed:18833190). Plays an essential role in germ cell differentiation and meiosis, independently of the function in transposable elements repression (PubMed:18833190). Acts via the piRNA metabolic process, which mediates the repression of transposable elements during meiosis by forming complexes composed of piRNAs and Piwi proteins and govern the methylation and subsequent repression of transposons (PubMed:18833190). During piRNA biosynthesis, plays a key role in the piRNA amplification loop, also named ping-pong amplification cycle, by acting as a 'slicer-competent' piRNA endoribonuclease that cleaves primary piRNAs, which are then loaded onto 'slicer-incompetent' piwil4 (By similarity). Piwil2 slicing produces a pre-miRNA intermediate, which is then processed in mature piRNAs, and as well as a 16 nucleotide by-product that is degraded (By similarity). Required for piwil4/miwi2 nuclear localization and association with secondary piRNAs antisense (By similarity). Represses circadian rhythms by promoting the stability and activity of core clock components ARNTL/BMAL1 and CLOCK (By similarity). Component of the PET complex. Probable component of the meiotic nuage, also named P granule, a germ-cell-specific organelle required to repress transposon activity during meiosis (By similarity). In mitotic and early meiotic cells of ovary, it is predominantly cytoplasmic. In primary oocytes, it is found in a granular distribution around the nucleus. Later, in maturing oocytes, it localizes to the nucleus. In testis, it is present in the cytoplasm of mitotic and meiotic germ cells, where a distinct granular distribution around the nucleus is observed. Detected in primordial germ cells (PGCs) from 3 dpf. In adult, it is found in both the female and male gonad. In the ovary, it is present in all stages of germ cell differentiation. In testis, it is present in mitotic and meiotic germ cells. No protein has been detected in the fully differentiated sperm cell. Methylated on arginine residues; required for the interaction with Tudor domain-containing protein and subsequent localization to the meiotic nuage, also named P granule. Progressive loss of germ cells due to apoptosis from 6 weeks of age. Belongs to the argonaute family. Piwi subfamily.