Emissions from smelting not only contaminate water and soil with metals, but also induce extensive forest dieback and changes in resource availability and microclimate. The relative effects of such co-occurring stressors are often unknown, but this information is imperative in developing targeted restoration strategies. We assessed the role and relative effects of structural alterations of terrestrial habitat and metal pollution caused by century-long smelting operations on amphibian and reptile communities by collecting environmental and time- and area-standardized multivariate abundance data along three spatially replicated impact gradients. Overall, species richness, diversity, and abundance declined progressively with increasing levels of metals (As, Cu, and Ni) and soil temperature (T(s)) and decreasing canopy cover, amount of coarse woody debris (CWD), and relative humidity (RH). The composite habitat variable (which included canopy cover, CWD, T(s), and RH) was more strongly associated with most response metrics than the composite metal variable (As, Cu, and Ni), and canopy cover alone explained 19-74% of the variance. Moreover, species that use terrestrial habitat for specific behaviors (e.g., hibernation, dispersal), especially forest-dependent species, were more severely affected than largely aquatic species. These results suggest that structural alterations of terrestrial habitat and concomitant changes in the resource availability and microclimate have stronger effects than metal pollution per se. Furthermore, much of the variation in response metrics was explained by the joint action of several environmental variables, implying synergistic effects (e.g., exacerbation of metal toxicity by elevated temperatures in sites with reduced canopy cover). We thus argue that the restoration of terrestrial habitat conditions is a key to successful recovery of herpetofauna communities in smelting-altered landscapes.