Recent temperature observations suggest a general warming trend that may be causing the range of tree species to shift to higher latitudes and altitudes. Since biotic interactions such as herbivory can change tree species composition, it is important to understand their contribution to vegetation changes triggered by climate change. To investigate the response of forests to climate change and herbivory by wild ungulates, we used the forest gap model ForClim v2.9.6 and simulated forest development in three climatically different valleys in the Swiss Alps. We used altitudinal transects on contrasting slopes covering a wide range of forest types from the cold (upper) to the dry (lower) treeline. This allowed us to investigate (1) altitudinal range shifts in response to climate change, (2) the consequences for tree species composition, and (3) the combined effect of climate change and ungulate herbivory. We found that ungulate herbivory changed species composition and that both basal area and stem numbers decreased with increasing herbivory intensity. Tree species responded differently to the change in climate, and their ranges did not change concurrently, thus causing a succession to new stand types. While climate change partially compensated for the reductions in basal area caused by ungulate herbivory, the combined effect of these two agents on the mix of the dominant species and forest type was non-compensatory, as browsing selectively excluded species from establishing or reaching dominance and altered competition patterns, particularly for light. We conclude that there is an urgent need for adaptive forest management strategies that address the joint effects of climate change and ungulate herbivory.