Understanding how plant species coexist in tropical rainforests is one of the biggest challenges in community ecology. One prominent hypothesis suggests that rare species are at an advantage because trees have lower survival in areas of high conspecific density due to increased attack by natural enemies, a process known as negative density dependence (NDD). A consensus is emerging that NDD is important for plant-species coexistence in tropical forests. Most evidence comes from short-term studies, but testing the prediction that NDD decreases the spatial aggregation of tree populations provides a long-term perspective. While spatial distributions have provided only weak evidence for NDD so far, the opposing effects of environmental heterogeneity might have confounded previous analyses. Here we use a novel statistical technique to control for environmental heterogeneity while testing whether spatial aggregation decreases with tree size in four tropical forests. We provide evidence for NDD in 22% of the 139 tree species analyzed and show that environmental heterogeneity can obscure the spatial signal of NDD. Environmental heterogeneity contributed to aggregation in 84% of species. We conclude that both biotic interactions and environmental heterogeneity play crucial roles in shaping tree dynamics in tropical forests.