Fungal endophytes are commonly associated with plants, and are considered an important component of crop production. They can influence plant growth and tolerance to biotic and abiotic stresses. The aim of this study was to analyse and identify endophytic fungi associated with rice roots in irrigated and upland ecosystems in Kenya, as an inventory for a future search for biological control and growth promoting agents. Fungi were isolated from the roots and selected based on culture characteristics. All selected isolates were sequenced using primers targeting the internal transcribed spacer (ITS) region, intergenic spacer (IGS) region and the gene encoding the translation elongation factor (TEF-1α). The species were determined by comparing their sequences with those of well characterised or type strains. Phylogenetic relationships among the species were used to identify their taxonomic groups, and distribution in the agroecosystems, especially for the Fusarium spp. Based on sequencing of the ITS region, 75 fungal isolates were identified as Fusarium-like, while the remaining 98 isolates were found to belong to different species representing other genera than Fusarium. A further analysis of the Fusarium spp., using concatenated IGS and TEF-1α sequences showed that these isolates belong to the Fusarium oxysporum (FOSC) and Gibberella fujikuroi (GFSC) species complexes. Within the FOSC isolates, a clear divergence was observed between isolates from irrigated and upland ecosystems, while in the GFSC this phenomenon was not observed. When the total number of species was considered, 27 species were identified in the irrigated ecosystems, while only 18 species were found in the upland ecosystems. More fungal species were found in the irrigated ecosystems than in the upland ecosystems. We propose that flooding may affect the assembly of endophytic fungi in rice roots, however, other factors such as rice cultivars, geographical locations and soil types could also be important.