Mountains are biodiversity hotspots and provide spatially compressed versions of regional and continental variation. They might be the most cost effective way to measure the environmental associations of regional biotic communities and their response to global climate change. We investigated spatial variation in epigeal ant diversity along a north–south elevational transect over the Soutpansberg Mountain in South Africa, to see to what extent these patterns can be related to spatial (regional) and environmental (local) variables and how restricted taxa are to altitudinal zones and vegetation types. A total of 40,294 ants, comprising 78 species were caught. Ant richness peaked at the lowest elevation of the southern aspect but had a hump-shaped pattern along the northern slope. Species richness, abundance and assemblage structure were associated with temperature and the proportion of bare ground. Local environment and spatially structured environmental variables comprised more than two-thirds of the variation explained in species richness, abundance and assemblage structure, while space alone (regional processes) was responsible for <10%. Species on the northern aspect were more specific to particular vegetation types, whereas the southern aspect’s species were more generalist. Lower elevation species’ distributions were more restricted. The significance of temperature as an explanatory variable of ant diversity across the mountain could provide a predictive surrogate for future changes. The effect of CO2-induced bush encroachment on the southern aspect could have indirect impacts complicating prediction, but ant species on the northern aspect should move uphill at a rate proportional to their thermal tolerance and the regional increases in temperature. Two species are identified that might be at risk of local extinction.