Mercury caused severe diversity loss and shifts in the soil microbiome. Fungal communities were generally less affected than the bacterial ones. A wide range of mercury-responsive taxa were found. Mercuric reductase genes were enhanced in soils with high Hg.