Interactions between plants and diverse root-associated fungi are essential drivers of forest ecosystem dynamics. The nature of the symbiosis in root systems is potentially dependent on multiple ecological factors/processes such as host/symbiont specificity, background soil microbiome structure, inter-root sharing/dispersal of symbionts, and fungus–fungus interactions within fine roots. Nonetheless, it has remained a major challenge to reveal the mechanisms by which those multiple factors/processes determine the assembly of mycorrhizal and endophytic fungal communities. Based on a framework of joint species distribution modeling, we here examined how root-associated fungal community structure was collectively formed through filtering by host plants, associations with background soil fungi, spatial autocorrelation, and symbiont–symbiont interactions. In our analysis targeting 1,615 root-tip samples collected in a cool-temperate forest dominated by ectomycorrhizal plants, statistical models including all the four ecological factors/processes best explained the fine-scale community structure of root-associated fungi. Meanwhile, among partial models including subsets of those ecological factors/processes, those including background soil microbiome structure and within-root fungus–fungus interactions showed the highest performance. When fine-root distributions of respective fugal species/taxa were examined, ectomycorrhizal fungi tended to show stronger associations with background soil community structure and stronger spatially-autocorrelated patterns than other fungal guilds. In contrast, the distributions of root-endophytic fungi were inferred to depend greatly on fungus–fungus interactions. A network statistical analysis further suggested that some endophytic fungi, such as those belonging to the ascomycete generaPhialocephalaandLeptodontidium, were involved in webs of positive and negative interactions with other root-associated fungi. These results suggest that basic assembly rules can differ between mycorrhizal and endophytic fungi, both of which are major components of forest ecosystems. Consequently, knowledge of how multiple ecological factors/processes differentially drive the assembly of multiple fungal functional guilds is indispensable for comprehensively understanding the mechanisms by which terrestrial ecosystem dynamics are organized by plant–fungal symbiosis.