Plant-symbiotic fungi influence the structure and function of all terrestrial ecosystems, but factors shaping their distributions in time and space are rarely well understood. Grasses (Poaceae), which first arose and diversified in tropical forests, harbor diverse but little-studied endophytes in the lowland forests of Panama. We used sequence data for 402 isolates from two sampling years, 11 host species, and 55 microsites at Barro Colorado Island, Panama to investigate the influence of host and habitat (soil type, forest age) in shaping endophyte diversity and composition. In contrast to previous studies, we found no evidence for host- or habitat specificity. Instead, endophytes demonstrated strong spatial structure consistent with dispersal limitation, with community similarity decaying markedly over a scale of hundreds of meters. Spatial structure that is independent of host species and habitat reveals remarkable heterogeneity of endophyte host associations at small geographic scales and adds an important spatial component to extrapolative estimates of fungal diversity. (C) 2013 Elsevier Ltd and The British Mycological Society. All rights reserved.