The Janzen–Connell hypothesis states that local species-specific density dependence, mediated through specialist enemies of offspring such as fungal pathogens and insect seed predators, can facilitate coexistence of species by preventing recruitment near conspecific adults. We use spatially explicit simulation models and analytical approximations to evaluate how spatial scales of offspring and enemy dispersal affect species richness. In comparison with model communities in which both offspring and enemies disperse long distances, species richness is substantially decreased when offspring disperse long distances and enemies disperse short distances. In contrast, when both offspring and enemies disperse short distances species richness more than doubles and adults of each species are highly spatially clumped. For the range of conditions typical of tropical forests, locally dispersing specialist enemies may decrease species richness relative to enemies that disperse long distances. In communities where dispersal distances of both offspring and enemies are short, local effects may enhance species richness.