We found no significant effect of harvesting intensity, time since last harvest or land-use history on total fungal MOTU diversity, fungal lifestyle diversity or taxonomic composition. In contrast, we observed significant effects of elevation, pH, organic carbon and available phosphorus content on the taxonomic and functional composition of soil fungal communities. Conclusions The structure of soil fungal communities (i.e. diversity and species composition) was mainly determined by elevation and edaphic factors, indicating a high-context dependency, as previously found in similar studies. Our study in mountain forests shows that recent forests established on former pastures had no legacy effect on soil conditions and fungal communities, in contrast to previous results in lowland areas, where recent forests were mainly established on former cropland. Uneven-aged forest management had no effect on fungal diversity, in contrast to previous results observed in even-aged high forests. Keywords: Harvesting, Legacy effect, Ancient forest, Soil chemistry, Metabarcoding