The mobility of transposable elements (TEs) contributes to evolution of genomes. Meanwhile, their uncontrolled activity causes genomic instability and therefore expression of TEs is silenced by host genomes. TEs are marked with DNA and H3K9 methylation that are associated with silencing in flowering plants, animals, and fungi. Yet, in distantly related eukaryotes TEs are instead marked by H3K27me3 deposited by the Polycomb Repressive Complex 2 (PRC2), an epigenetic mark associated with gene silencing in multicellular eukaryotes. It was therefore proposed that the ancestral activity of PRC2 was the deposition of H3K27me3 to silence TEs. To test this hypothesis we obtained mutants deprived of PRC2 activity and used genomics to analyze the role of PRC2 in extant species along the lineage of Archaeplastida. While in the red alga Cyanidioschyzon merolae more TEs than genes were repressed by PRC2, an opposite trend was observed in bryophytes Marchantia polymorpha and Anthoceros agrestis. In the red alga, TEs silenced by H3K27me3 are in subtelomeres but in bryophytes, TEs and genes marked by H3K27me3 form coregulated transcriptional units. The latter trend was also observed in the flowering plant Arabidopsis thaliana, and we identified cis-elements recognised by transcription factors in TEs flanking genes repressed by PRC2. Together with the silencing of TEs by PRC2 in ciliates that diverged early from an ancestor common with Archaeplastida, our findings support the hypothesis that PRC2 deposited H3K27me3 to silence TEs in early lineages of eukaryotes. During evolution, TE fragments marked with H3K27me3 were selected to shape transcriptional regulation that control networks of genes regulated by PRC2.