Plant roots select non-random communities of fungi and bacteria from the surrounding soil that have effects on their health and growth, but we know little about the factors influencing their composition. We profiled bacterial microbiomes associated with individual ectomycorrhizal Pinus sylvestris roots colonized by different fungi and analyzed differences in microbiome structure related to soils from distinct podzol horizons and effects of short-term additions of N, a growth-limiting nutrient commonly applied as a fertilizer, but known to influence patterns of carbon allocation to roots. Ectomycorrhizal roots growing in soil from different horizons harboured distinct bacterial communities. The fungi colonizing individual roots had a strong effect on the associated bacterial communities. Even closely related species within the same ectomycorrhizal genus had distinct bacterial microbiomes in unfertilized soil, but fertilization removed this specificity. Effects of N were rapid and context dependent, being influenced by both soil type and the particular ectomycorrhizal fungi involved. Fungal community composition changed in soil from all horizons, but bacteria only responded strongly to N in soil from the B horizon where community structure was different and bacterial diversity was significantly reduced, possibly reflecting changed carbon allocation patterns.