Mountainous areas host a disproportionately large fraction of Earth's biodiversity, suggesting a causal relationship between mountain building and biological diversification. Mountain clade radiations are generally associated with environmental heterogeneity, and with ecological opportunities created during the formation of high-elevation habitats. In South America, most documented Andean clade radiations are recent (Neogene) and rapid. However, so far only few studies have explicitly linked Andean elevation to species diversification. Here, we present a curve of Andean elevation based on a recent compilation of paleo-elevational data back to the Late Cretaceous, and analyse the diversification history of six Andean frog and lizard families that originated equally far back in time. For two clades (Aromobatidae and Leptodactylidae), we find that they diversified most rapidly during the early phase of mountain building (Late Cretaceous - Paleogene), when the first high-elevation habitats emerged in South America. The diversification of two other clades (Centrolenidae and Dendrobatidae) are correlated with Cenozoic temperature variations, with higher speciation (and for Dendrobatidae, also higher extinction) rates during warm periods. The last two clades (Hemiphractidae and Liolaemidae) are best explained by environment-independent diversification, although for Liolaemidae, an almost equally strong positive correlation was found between speciation and Andean elevation since the late Eocene. Our findings imply that throughout the long-lived history of surface uplift in the Andes, mountain building drove the diversification of different clades at different times, while not directly affecting other clades. Our study illustrates the importance of paleogeographic reconstructions that capture the complexity and heterogeneity of mountain building in our understanding of the effects that a changing environment plays in shaping biodiversity patterns observed today.