The degree to which geographical location rather than environment affects the maintenance of high tropical forest beta diversity on altitudinal gradients is not well understood. Forest composition and its relationship to climate, soil, altitude and geographical distance were determined across an 1114-km2 landscape in south Pacific Costa Rica spanning an altitudinal gradient (0–1500 m asl). In 37 0.25-ha plots, > 200 species of dicot trees (≥ 30 cm dbh) and canopy palms (≥ 10 cm dbh) were found. Ordination analysis showed strong species composition patterns related to altitude; plot coordinates on the main axis showed negative correlations to the abundance of lowland-forest species Iriartea deltoidea (r = −0.54) and Brosimum utile (r = −0.65), and positive correlations to higher-altitude species Alchornea glandulosa (r = 0.63), Quercus sp. (r = 0.50) and Ocotea sp. 2 (r = 0.48). Mantel correlations, correlograms and variation partitioning analysis of relationships between floristic composition and spatial and environmental factors indicated that spatial location of the plots – potentially, dispersal limitation – was the single most important (R2adj = 0.149) driver of beta diversity, but that environmental heterogeneity also plays an important role. In particular, palm species turnover was strongly related to soil chemical properties. The effects of dispersal limitation on floristic assembly could determine the future distribution of plant communities as a result of climate change.