Abstract Question Dispersal limitation (neutral hypothesis) and deterministic factors (niche hypothesis) shape floristic gradients including between‐site patterns of species’ dominance (co‐dominance). Because their relative importance remains poorly known, we ask how their comparative contribution to co‐dominance changes with elevation and geographical extent. Location Madidi region, NW Bolivia. Methods We analysed floristic composition and environmental factors of 90 plots spanning the gradient from Amazonian (<1,000 m) to montane forests at three elevations (1,200–1,500; 2,000–2,300; and 2,800–3,200 m) and two geographical extents: local (plots <12 km apart) and regional (38–120 km apart). We modelled distance decay within each elevational band with a neutral model, using two parameters (speciation rate and dispersal distance). Subsequently, we related the model's residuals to environmental differences using flexible machine learning models. Results We found that 5–44% of the variability in floristic differences along the gradient studied can be explained by a neutral model of distance decay, while 18–50% can be explained by environmental differences. Montane forests showed an overall gradient in floristic composition that is congruent with an increase in elevation for both dispersal limitation and environmental filtering. However, Amazonian forest was more niche‐structured and more dispersal‐limited relative to its elevation and topography. Conclusions Environmental differences explained floristic differences better than the neutral model, even giving preferential attribution to the more parsimonious neutral processes.