Updated publication reference for PubMed record(s): 31384064. Small RNA silencing pathways protect genome integrity in part through establishing heterochromatin at transposon loci. In animals, this process requires piRNA-guided targeting of nuclear PIWI proteins to nascent transcripts. The molecular events contributing to heterochromatin formation upon PIWI binding to nascent RNA, a transient molecule at chromatin, are unknown. Here, we identify SFINX, a protein complex that is required for Piwi-mediated co-transcriptional silencing in Drosophila. It consists of Nxf2—a variant of the nuclear RNA export factor Nxf1/Tap, the mRNA export co-factor Nxt1/p15, and the Piwi-associated protein Panoramix. In the absence of Nxf2, Panoramix is targeted for degradation and piRNA-loaded Piwi is unable to establish heterochromatin. Consequently, nxf2 mutants exhibit severe transposon de-repression and are sterile. We show that within SFINX, Panoramix connects to the heterochromatin machinery while Nxf2 enables target silencing via nascent RNA. Thus, the Nxf2-Nxt1 heterodimer—despite having originated from core mRNA export machinery—has been repurposed for heterochromatin formation. Our data establish an unexpected link between nuclear small RNA biology and NXF-variants, which are widespread in animal lineages, but mostly lack ascribed functions.