Nuclear small RNA pathways safeguard genome integrity by establishing transcription-repressing heterochromatin at transposable elements. This inevitably also targets the transposon-rich source loci of the small RNAs themselves. How small RNA source loci are efficiently transcribed while transposon promoters are potently silenced is not understood. Here we show that, in Drosophila, transcription of PIWI-interacting RNA (piRNA) clusters-small RNA source loci in animal gonads-is enforced through RNA polymerase II pre-initiation complex formation within repressive heterochromatin. This is accomplished through Moonshiner, a paralogue of a basal transcription factor IIA (TFIIA) subunit, which is recruited to piRNA clusters via the heterochromatin protein-1 variant Rhino. Moonshiner triggers transcription initiation within piRNA clusters by recruiting the TATA-box binding protein (TBP)-related factor TRF2, an animal TFIID core variant. Thus, transcription of heterochromatic small RNA source loci relies on direct recruitment of the core transcriptional machinery to DNA via histone marks rather than sequence motifs, a concept that we argue is a recurring theme in evolution.