© 2017 John Wiley & Sons Ltd Whether niche processes, like environmental filtering, or neutral processes, like dispersal limitation, are the primary forces driving community assembly is a central question in ecology. Here, we use a natural experimental system of isolated tree “islands” to test whether environment or geography primarily structures fungal community composition at fine spatial scales. This system consists of isolated pairs of two distantly related, congeneric pine trees established at varying distances from each other and the forest edge, allowing us to disentangle the effects of geographic distance vs. host and edaphic environment on associated fungal communities. We identified fungal community composition with Illumina sequencing of ITS amplicons, measured all relevant environmental parameters for each tree—including tree age, size and soil chemistry—and calculated geographic distances from each tree to all others and to the nearest forest edge. We applied generalized dissimilarity modelling to test whether total and ectomycorrhizal fungal (EMF) communities were primarily structured by geographic or environmental filtering. Our results provide strong evidence that as in many other organisms, niche and neutral processes both contribute significantly to turnover in community composition in fungi, but environmental filtering plays the dominant role in structuring both free-living and symbiotic fungal communities at fine spatial scales. In our study system, we found pH and organic matter primarily drive environmental filtering in total soil fungal communities and that pH and cation exchange capacity—and, surprisingly, not host species—were the largest factors affecting EMF community composition. These findings support an emerging paradigm that pH may play a central role in the assembly of all soil-mediated systems.