Molecular characterisation has convincingly demonstrated some types of horizontal gene transfer in eukaryotes, but nuclear gene transfer between distantly related eukaryotic groups appears to have been rare. For angiosperms (flowering plants), nuclear gene transfer events identified to date have been confined to genes originating from prokaryotes or other plant species. In this report, evidence for ancient horizontal transfer of a fungal nuclear gene, encoding a ß-1,6-glucanase enzyme for fungal cell wall degradation, into an angiosperm lineage is presented for the first time. The gene was identified from de novo sequencing and assembly of the genome and transcriptome of perennial ryegrass, a cool-season grass species. Molecular analysis confirmed the presence of the complete gene in the genome of perennial ryegrass. No corresponding sequence was found in other plant species, apart from members of the Poeae sub-tribes Loliinae and Dactylidinae. Evidence suggests that a common ancestor of the two sub-tribes acquired the gene from a species ancestral to contemporary grass-associated fungal endophytes around 9-13 million years ago. This first report of horizontal transfer of a nuclear gene from a taxonomically distant eukaryote to modern flowering plants provides evidence for a novel adaptation mechanism in angiosperms.