Plants are constantly challenged by pathogens, which can cause substantial yield losses. The aggressiveness of and damage by pathogens depends on the host-associated microbiome, which might be shaped by plant genetics to improve resistance. How different crop genotypes modulate their microbiota when challenged by a complex of pathogens is largely unknown. Here, we investigate if and how pea (Pisum sativum L.) genotypes shape their root microbiota upon challenge by soil-borne pathogens and how this relates to a genotype's resistance. Building on the phenotyping efforts of 252 pea genotypes grown in naturally infested soil, we characterized root fungi and bacteria by ITS region and 16S rRNA gene amplicon sequencing, respectively. Pea genotype markedly affected both fungal and bacterial community composition, and these genotype-specific microbiota were associated with root rot resistance. For example, genotype resistance was correlated (R2 = 19%) with root fungal community composition. Further, several key microbes, showing a high relative abundance, heritability, connectedness with other microbes, and correlation with plant resistance, were identified. Our findings highlight the importance of crop genotype-specific root microbiota under root rot stress and the potential of the plant to shape its associated microbiota as a second line of defense.