Endophytic fungi were isolated from the pharmaceutical plant Annona squamosa during different seasons and 131 strains were isolated. Fermentation extracts of each strain was assayed using six different screening programs for bioactive compounds. Sixty-three of the strains producing bioactive compounds were identified by ITS rDNA sequence data. The diversity of the polyketide synthase (PKS) genes of these 63 strains was investigated using three pairs of primers, LC1-LC2c, LC3-LC5c and KS3-KS4c. Phylogenetic analysis showed that these fungi are distributed in 10 orders, in 19 genera, mostly in the orders Diapothales and Hypocreales. The groups with the highest bioactivity were from Diapothales, Clavicipitales and Xylariales. The relationship between the taxa producing bioactive compounds and the PKS genes indicates that 11 out of the 63 strains analysed contained all three KS domains. Eight of these belonged to the order Diapothales. Twenty mostly hypocrealean and phyllachoralean strains lacked a single KS domain in all three pairs of primers amplified. Two important conclusions can be drawn from this investigation. The endophytic fungi of A. squamosa contain a community with a high degree of bioactivity: Secondly, compared with other fungi, those taxa from the order Diapothales have a rich species diversity and rich PKS gene domains. These findings suggest that they have a high potential as producers of natural bioactive compounds.Ministry of Science and Technology [2007DFA30970]; National High Technology Research and Development Program of China [2007AA091503