Deciphering the Distinct Associations of Rhizospheric and Endospheric Microbiomes with 
Capsicum ( Capsicum annuum L.) has emerged as the globally third largest vegetable crops due to its unique flavor and extensive application. It is cultivated in the temperate, subtropical, and tropical regions . Since the twenty-first century, both the planting area and production of capsicum have exhibited a steady growth globally. Notably, China’s capsicum industry has experienced rapid development. Currently, China has emerged as the world’s largest producer and consumer of capsicum and its by-products . In recent years, due to intensive agricultural practices, prolonged continuous cropping, and inappropriate utilizations of fertilizers and pesticides, the capsicum production has been increasingly affected by various soil-borne diseases. Among these diseases, the blight can be especially serious in the capsicum cultivation, significantly affecting both yield and quality. Capsicum blight is a global fungal disease caused by Phytophthora capsici Leonian, which can be transmitted through soil or rainwater. The adverse consequences involve plant mortality, fruit ulceration, and crop failure, thereby leading to significant economic losses for vegetable producers . To stabilize capsicum production and advance the industry, it is crucial to understand the mechanisms underlying capsicum blight occurrence before implementing targeted control measures. In traditional agricultural practices, soil chemical fumigation and chemical fungicides applications are main methods for managing capsicum blight. However, the long-term utilizations of chemical fungicides may increase soil contamination with pesticide residues , potentially harming soil organisms and posing risks to the environment and human health . Therefore, developing green and effective strategies to control capsicum blight is vital for sustainable development of the capsicum industry . With growing concerns about environmental protection and food safety in recent years, there has been an increasing interest in regulating endospheric and rhizospheric microbiomes through production management practices and employing organic products containing beneficial plant microorganisms for blight control . Plants will primarily acquire water and nutrients from the soil via their roots, which are essential for growth and development. The rhizosphere, characterized by intense root-soil interaction, plays a significant role in regulating soil nutrient activation and utilization, maintaining soil health, and enhancing plant disease resistance . Rhizosphere microbiomes are pivotal determinants of plant health  and play a critical role in enhancing both plant growth and resistance . They are frequently regarded as the “second genome” of plants . A variety of plants exhibit significant differences in their rhizospheric microbiomes that are closely linked to the plant health and productivity. Plants and microorganisms can interact and restrict each other, thereby creating a micro-ecological environment in which they coexist in harmony . Plant endophytes serve as the “bridge” between the above- and below-ground microbiomes, with certain microbial taxa transitioning from the rhizosphere and phyllosphere to become endophytes in plant tissues through plant-specific recruitment mechanisms . This process realizes the communication and transfer of microorganisms between the soil and plant niches. The changes in microbial communities have been linked to increased plant resistance to diseases, such as potato scab  and capsicum blight . Moreover, interactions between rhizospheric microorganisms will affect the recruitment of beneficial plant microbiomes . Therefore, probing into the endospheric and rhizospheric microbiomes along with their associations can offer valuable perspectives regarding the pathological status of capsicum plants and guide the implementation of timely and targeted biological control strategies. The primary objectives of this study involved distinguishing the differences between the endospheric and rhizospheric microbiomes in capsicum plants at varying pathological status and identifying the indicator species associated with the plant health. The samples were collected from a long-term capsicum cultivation site, including healthy and diseased plants, and their rhizosphere soil. High-throughput sequencing was performed to analyze the diversity, community assembly, stability, and potential functions of the endospheric and rhizospheric microbiomes. This study aimed to validate three hypotheses: (1) the diversity and community assembly of endospheric and rhizospheric microbiomes may be influenced by the health status of capsicum plants; (2) the community stability of endospheric and rhizospheric microbiomes in healthy capsicum plants may surpass that of diseased plants; and (3) the bacterial taxa in the capsicum root endosphere and rhizosphere may serve as better indicators of plant pathological status than fungal taxa. This study could decipher the distinct associations of rhizospheric and endospheric microbiomes with Capsicum plant pathological status. Additionally, this study could offer a new insight on harnessing microbial resources for the prevention and control of capsicum blight.   Soil and Plant Sampling The soil and plant samples were collected from a plastic shield agricultural system measuring 25 m × 10 m in Xiangtan, Hunan Province, China (27° 51′ N, 112° 46′ E). The field had been continuously cultivated with capsicum plants for 8 years at the time of sampling. The average local precipitation in this area is approximately 1300 mm, with an average temperature of approximately 23 ℃. Initially, the soil (0–20-cm depth) exhibited the following properties: pH 6.78, total nitrogen 2.63 g kg −1 , total phosphorus 1.03 g kg −1 , total potassium 12.05 g kg −1 , organic matter 43.00 g kg −1 , alkali-hydrolyzed nitrogen 197.75 mg kg −1 , and available phosphorus 140.88 mg kg −1 . The capsicum variety cultivated was “ Xingshuzhoula No.2 ”. Owing to the long-term monoculture, the field encountered significant blight incidence for three consecutive years, specifically during the fruiting stage. Six healthy zones without the blight symptoms were demarcated. The blighted plants exhibited a series of characteristic symptoms, namely, root blackening, necrosis, putrefaction of the phloem and stem, light brown xylem, and rapid withering of branches and leaves, which ultimately led to plant deaths. Additionally, six diseased zones were identified based on the disease incidence (> 70%) (Fig. ). The healthy and diseased zones were randomly distributed throughout the field. Five plants were randomly selected from each healthy or diseased zone. The soil adhering tightly to the roots (approximately < 1 mm) was rinsed with sterilized water, freeze-dried, and designated the rhizosphere soil. Five samples from each zone were combined to create one replicate. A total of 12 rhizosphere soils and 12 root samples were collected, representing two pathological status across the six zones. The root samples were carefully rinsed with sterile water to remove impurities from the root surfaces. The cleaned roots were then dissected using a sterile scalpel, transferred into 50-mL sterile centrifuge tubes, and promptly submerged in liquid nitrogen for preservation. DNA Extraction and Amplicon Sequencing For microbial DNA extraction from the endosphere, 3–5 g roots (obtained after carefully removing large chunks of soil from the roots) were placed in polystyrene tubes containing 35 ml buffer (0.1 M potassium phosphate, 0.1% glycerol, and 0.15% Tween 80, pH 7.0) and sonicated at 40 kHz for 1 min. The samples were then shaken for 4 min at 200 rpm on a shaker . Then the root underwent a series of surface sterilization steps: rinsing with 70% ethanol for 5 min, exposure to 5% sodium hypochlorite solution (containing 0.1% Tween 80) for 5 min, followed by another rinse with 70% ethanol for 30 s, and finally washing with sterile H 2 O five times to remove surface residues . The sterile water from the final rinse was coated on TSA media and then incubated at a constant temperature of 37 °C for 2 days to assess its sterilization efficacy. If no visible colonies emerged, the root surface was considered completely sterilized. Subsequently, the treated roots were ground with liquid nitrogen using a sterile mortar and pestle and stored at − 80 °C. The total DNA from the root endosphere and rhizosphere soil was extracted using the Power Soil® DNA Isolation Kit (Qiagen, Hilden, Germany), according to the manufacturer’s instructions. The DNA samples from the endosphere and rhizosphere were subjected to amplicon sequencing. Corresponding polymerase chain reaction assays of the V4 − V5 region of bacteria and ITS region 1 of fungi were performed using the primer pairs of 515F/907R and ITS5-1737F/ITS2-2043R, respectively . The sequencing was performed by the Personal Biotechnology Co. Ltd. (Shanghai, China) using an Illumina MiSeq platform. The QIIME2 tool (version 2018.11) was applied to process the raw reads . The high-quality sequences were acquired after removing the low-quality sequences (average quality score < 25 and sequence length < 50 bp or did not match the primer and barcode) and discarding the chimeric sequences. The identification of amplicon sequence variants (ASVs) underwent quality control using the “DADA 2” software . The taxonomic classification of bacteria, fungi, and eukaryotes was accomplished using the SILVA databases (version 138)  and UNITE database (version 7.0) , respectively. Bioinformatics and Statistical Analysis The observed richness that can measure the microbial α-diversity was computed using the “vegan” package in R software (version 4.3.1). The phylogenetic diversity of the bacteria and fungi was calculated from the total branch length of the phylogenetic tree using the “picante” R package. The significant differences in the microbial diversity data were analyzed using ANOVA according to the IBM SPSS Statistics (version 25), with the mean comparisons performed using the LSD method ( P ≤ 0.05). The sample species turnover and nestedness differences were assessed using the “beta-part” R package . Non-metric multi-dimensional scaling (NMDS) analysis and multivariate analysis of variance (Adonis) based on the Bray-Curtis distance were utilized to evaluate the interpretation degree of sample differentiation across different grouping factors. The “randomForest” package in R was applied to establish a random forest classification model to identify the biomarkers capable of effectively distinguishing the pathological status of capsicum plants. Additionally, a neutral community model was employed to evaluate the importance of stochastic or neutral processes in community assembly through predicting the abundance distribution and occurrence frequency of ASVs . Moreover, the null model was used to quantify the contributions of determinism and stochasticity to the ecological assembly processes of microbial communities . The co-occurrence networks of the microbial communities were constructed by the Spearman’s correlation coefficient using the “WGCNA” R package. The correlation coefficients higher than 0.6 were deemed statistically significant ( P < 0.05). The network visualization was performed using the Gephi software (version 0.10.1) . The topological indices, such as the average degree (AD) and mean clustering coefficient (MC), were calculated using the Gephi software. The network robustness, indicating the resistance to node loss after random removal, was assessed using the “ggClusterNet” R package , which can be commonly employed to evaluate the stability of microbial community networks. To predict the potential functions of bacterial communities, the species count from the original sequencing data was standardized and mapped onto a functional gene composition table of the sequenced genomes. This process yielded predicted functional results based on the biochemical metabolic pathways and tertiary KEGG annotations. The PICRUSt was applied to generate a functional map . Differential analyses, using the “DESeq2” R package, were conducted to determine the enrichment and depletion of microbial communities and functions between the root endosphere and rhizosphere at two plant pathological status .   The soil and plant samples were collected from a plastic shield agricultural system measuring 25 m × 10 m in Xiangtan, Hunan Province, China (27° 51′ N, 112° 46′ E). The field had been continuously cultivated with capsicum plants for 8 years at the time of sampling. The average local precipitation in this area is approximately 1300 mm, with an average temperature of approximately 23 ℃. Initially, the soil (0–20-cm depth) exhibited the following properties: pH 6.78, total nitrogen 2.63 g kg −1 , total phosphorus 1.03 g kg −1 , total potassium 12.05 g kg −1 , organic matter 43.00 g kg −1 , alkali-hydrolyzed nitrogen 197.75 mg kg −1 , and available phosphorus 140.88 mg kg −1 . The capsicum variety cultivated was “ Xingshuzhoula No.2 ”. Owing to the long-term monoculture, the field encountered significant blight incidence for three consecutive years, specifically during the fruiting stage. Six healthy zones without the blight symptoms were demarcated. The blighted plants exhibited a series of characteristic symptoms, namely, root blackening, necrosis, putrefaction of the phloem and stem, light brown xylem, and rapid withering of branches and leaves, which ultimately led to plant deaths. Additionally, six diseased zones were identified based on the disease incidence (> 70%) (Fig. ). The healthy and diseased zones were randomly distributed throughout the field. Five plants were randomly selected from each healthy or diseased zone. The soil adhering tightly to the roots (approximately < 1 mm) was rinsed with sterilized water, freeze-dried, and designated the rhizosphere soil. Five samples from each zone were combined to create one replicate. A total of 12 rhizosphere soils and 12 root samples were collected, representing two pathological status across the six zones. The root samples were carefully rinsed with sterile water to remove impurities from the root surfaces. The cleaned roots were then dissected using a sterile scalpel, transferred into 50-mL sterile centrifuge tubes, and promptly submerged in liquid nitrogen for preservation.   For microbial DNA extraction from the endosphere, 3–5 g roots (obtained after carefully removing large chunks of soil from the roots) were placed in polystyrene tubes containing 35 ml buffer (0.1 M potassium phosphate, 0.1% glycerol, and 0.15% Tween 80, pH 7.0) and sonicated at 40 kHz for 1 min. The samples were then shaken for 4 min at 200 rpm on a shaker . Then the root underwent a series of surface sterilization steps: rinsing with 70% ethanol for 5 min, exposure to 5% sodium hypochlorite solution (containing 0.1% Tween 80) for 5 min, followed by another rinse with 70% ethanol for 30 s, and finally washing with sterile H 2 O five times to remove surface residues . The sterile water from the final rinse was coated on TSA media and then incubated at a constant temperature of 37 °C for 2 days to assess its sterilization efficacy. If no visible colonies emerged, the root surface was considered completely sterilized. Subsequently, the treated roots were ground with liquid nitrogen using a sterile mortar and pestle and stored at − 80 °C. The total DNA from the root endosphere and rhizosphere soil was extracted using the Power Soil® DNA Isolation Kit (Qiagen, Hilden, Germany), according to the manufacturer’s instructions. The DNA samples from the endosphere and rhizosphere were subjected to amplicon sequencing. Corresponding polymerase chain reaction assays of the V4 − V5 region of bacteria and ITS region 1 of fungi were performed using the primer pairs of 515F/907R and ITS5-1737F/ITS2-2043R, respectively . The sequencing was performed by the Personal Biotechnology Co. Ltd. (Shanghai, China) using an Illumina MiSeq platform. The QIIME2 tool (version 2018.11) was applied to process the raw reads . The high-quality sequences were acquired after removing the low-quality sequences (average quality score < 25 and sequence length < 50 bp or did not match the primer and barcode) and discarding the chimeric sequences. The identification of amplicon sequence variants (ASVs) underwent quality control using the “DADA 2” software . The taxonomic classification of bacteria, fungi, and eukaryotes was accomplished using the SILVA databases (version 138)  and UNITE database (version 7.0) , respectively.   The observed richness that can measure the microbial α-diversity was computed using the “vegan” package in R software (version 4.3.1). The phylogenetic diversity of the bacteria and fungi was calculated from the total branch length of the phylogenetic tree using the “picante” R package. The significant differences in the microbial diversity data were analyzed using ANOVA according to the IBM SPSS Statistics (version 25), with the mean comparisons performed using the LSD method ( P ≤ 0.05). The sample species turnover and nestedness differences were assessed using the “beta-part” R package . Non-metric multi-dimensional scaling (NMDS) analysis and multivariate analysis of variance (Adonis) based on the Bray-Curtis distance were utilized to evaluate the interpretation degree of sample differentiation across different grouping factors. The “randomForest” package in R was applied to establish a random forest classification model to identify the biomarkers capable of effectively distinguishing the pathological status of capsicum plants. Additionally, a neutral community model was employed to evaluate the importance of stochastic or neutral processes in community assembly through predicting the abundance distribution and occurrence frequency of ASVs . Moreover, the null model was used to quantify the contributions of determinism and stochasticity to the ecological assembly processes of microbial communities . The co-occurrence networks of the microbial communities were constructed by the Spearman’s correlation coefficient using the “WGCNA” R package. The correlation coefficients higher than 0.6 were deemed statistically significant ( P < 0.05). The network visualization was performed using the Gephi software (version 0.10.1) . The topological indices, such as the average degree (AD) and mean clustering coefficient (MC), were calculated using the Gephi software. The network robustness, indicating the resistance to node loss after random removal, was assessed using the “ggClusterNet” R package , which can be commonly employed to evaluate the stability of microbial community networks. To predict the potential functions of bacterial communities, the species count from the original sequencing data was standardized and mapped onto a functional gene composition table of the sequenced genomes. This process yielded predicted functional results based on the biochemical metabolic pathways and tertiary KEGG annotations. The PICRUSt was applied to generate a functional map . Differential analyses, using the “DESeq2” R package, were conducted to determine the enrichment and depletion of microbial communities and functions between the root endosphere and rhizosphere at two plant pathological status .   Rhizospheric and Endospheric Microbial Diversity of the Healthy and Diseased Capsicum Plants The rhizospheric microbiomes of healthy plants exhibited significantly higher bacterial richness than those of the diseased plants (Fig. A). The bacterial richness and phylogenetic diversity in rhizospheric microbiomes surpassed those in the endospheric microbiomes, regardless of the plant health status (Fig. A and B). Within both the endospheric and rhizospheric microbiomes, no remarkable disparities were detected in terms of fungal richness or phylogenetic diversity when comparing the healthy plants with the diseased ones. The community composition of the rhizospheric and endospheric microbiomes differed significantly between healthy and diseased plants, as indicated by the NMDS analysis, regardless of bacteria and fungi (Fig. C). Additionally, the community composition of rhizospheric microbiomes varied significantly from that of endospheric microbiomes, regardless of the plant health status. The location (fungi, R 2 = 0.35, P < 0.001; bacteria, R 2 = 0.26, P < 0.001) demonstrated a more pronounced effect on community composition than did plant pathological status (fungi, R 2 = 0.05; bacteria, R 2 = 0.08, P < 0.01) (Fig. C). To explore the underlying causes of community composition differences, the bacterial and fungal β-diversity analyses were conducted based on the Bray-Curtis and Sorensen distances. The β-diversity comprised species turnover and nestedness components, with species turnover contributed almost the majority of bacterial and fungal community succession (Fig. D and E), particularly in bacterial communities (0.6–0.9). In rhizospheric microbiomes, the fungal nestedness exceeded that in endospheric microbiomes, and the bacterial turnover was higher in the rhizospheric microbiomes than in the endospheric microbiomes, regardless of the plant health status. Rhizospheric and Endospheric Key Microbial Taxa of the Healthy and Diseased Capsicum Plants The microbial phylogenetic classification revealed significant differences in the rhizospheric and endospheric microbiomes between healthy and diseased plants (Fig. F). Cladosporium was the main genus for rhizospheric microbiomes, and Fusarium was the main genus for endospheric microbiomes among fungal communities. In the healthy rhizosphere, the genus Aspergillus was enriched, and Acremonium was depleted compared to those in the diseased rhizosphere. The genus Streptomyces and Bacillus were the main taxa in all samples of bacterial communities, with the Gaiella being unique to the rhizosphere bacterial communities. In the diseased plants, Streptomyces and Bacillus were enriched in both the rhizosphere and root endosphere compared with the healthy plants. Furthermore, Streptomyces and Mycobacterium were enriched, and Nocardioides and Gemmatimonas were depleted in the root endosphere compared with the rhizosphere (Fig. F). Compared to the diseased rhizosphere, 13 fungal ASVs were enriched and 23 were depleted in the healthy rhizosphere (Fig. A). Similarly, in comparison with the diseased root endophyte, 14 fungal ASVs were found to be enriched while six were depleted in the healthy endophyte. Additionally, compared to the root endophyte, 31 fungal ASVs were enriched, and 14 were depleted in the diseased rhizosphere, and 44 fungal ASVs were enriched, and 60 were depleted in the healthy rhizosphere (Fig. A). The majority of the co-enriched fungal ASVs in the diseased root endophyte and rhizosphere belonged to the phylum Ascomycota (Fig. B and C). Similarly, compared with the diseased rhizosphere, 109 bacterial ASVs were enriched and 140 were depleted in the healthy rhizosphere (Fig. A). In contrast, compared to the diseased root endophyte, 87 bacterial ASVs were enriched and 71 were depleted in the healthy endophyte. Moreover, compared to the endophyte, 297 bacterial ASVs were enriched, and 152 were depleted in the diseased rhizosphere, whereas 267 were enriched, and 119 were depleted in the healthy rhizosphere (Fig. A). The majority of the co-enriched bacterial ASVs within the healthy root endophyte and rhizosphere were affiliated with the phyla Proteobacteria, Actinobacteria, and Firmicutes (Fig. B and C). A random forest model was implemented to identify the primary ASVs responsible for distinguishing between healthy and diseased plants in both the root endophyte and the rhizosphere. The model exhibited high levels of accuracy, with the error rate ranging from 16.67 to 33.33% (Fig. ). The bacterial indicators (ASVs) primarily belonged to the class Actinobacteria, Alphaproteobacteria, and Bacilli, and the fungal indicators were associated with Sordariomycetes, Eurotiomycetes, and Mortierellomycetes (Fig. ). Specific key indicators, namely bacterial ASV4651 and fungal ASV11, ASV285, and ASV614 along with ASV827, were found to be enriched within the healthy rhizosphere, whereas bacterial ASV456 and fungal ASV1655, ASV619, ASV1136, ASV168, and ASV467 were enriched in the diseased rhizosphere (Figs. , , A, and B). Similarly, the bacterial ASV1242, ASV2397, ASV693, and ASV4651, as well as fungal ASV192, ASV23, and ASV54, were enriched in the healthy root endophyte, and the bacterial ASV3141 and ASV1315, along with fungal ASV176, ASV5304, ASV841, ASV288, and ASV64, were enriched in the diseased endophyte (Figs. , , C, and D). Notably, the ASV4651 served as an indicator species and was enriched in both the healthy endophyte and rhizosphere. In addition, a random forest model was constructed to identify the primary indicators of both rhizospheric and endospheric microbiomes in healthy and diseased plants, achieving error rates ranging from 0 to 8.33% (Fig. ). The bacterial indicators mainly belonged to Alphaproteobacteria and Actinobacteria, and the fungal indicators belonged to Eurotiomycetes and Dothideomycetes (Fig. ). Most bacterial indicators were enriched in the healthy rhizosphere but not in the diseased rhizosphere, and most fungal indicators were enriched in both healthy and diseased endosphere. Rhizospheric and Endospheric Microbial Assembly Processes of the Healthy and Diseased Capsicum Plants The neutral community model provided an excellent fit to the microbial data in this study (Fig. A and B). The analysis revealed that the majority of ASVs adhered to the expected occurrence frequency, strongly indicating that stochastic processes played a preponderant role in governing the assembly of both the rhizospheric and endospheric microbiomes. The lower m values (0.002–0.013) suggested significant limitations in community diffusion across all the samples. Notably, the diffusion limitation, as reflected by the m value, was more pronounced in rhizospheric fungal communities than in the rhizospheric bacterial communities, indicating a greater impact of the dispersal limitations on fungal communities. Nevertheless, the lower R 2 values (0.048–0.415) implied that deterministic processes also played a relatively significant role in the community assembly. The fungal communities were observed to experience a more prominent influence from deterministic processes in contrast to bacterial communities.(Fig. A and B). Most β-NTI scores fell within the range of − 2 to 2, demonstrating the predominant influence of stochastic processes on the microbial community assembly (Fig. C and D). The β-NTI values revealed that the median values of healthy rhizospheric and endospheric microbiomes exceeded those of their diseased couterparts, with the endospheric microbiomes had higher median values than the rhizospheric ones. The null model analysis indicated distinct microbial assembly processes between the diseased and healthy plants, regardless of the rhizosphere and root endophyte (Fig. C and D). The homogenizing dispersal played a predominant role in shaping the endophytic fungal communities (> 75%), whereas the heterogeneous selection, ecological drift, and dispersal limitation had limited effects on the community assembly. Hence, a decline in plant pathological status amplified the impact of homogeneous selection on the community assembly of the rhizospheric and endospheric microbiomes. Rhizospheric and Endospheric Microbial Community Complexity and Stability of the Healthy and Diseased Capsicum Plants To gain deeper insights into the community complexity of both rhizospheric and endospheric microbiomes in the healthy and diseased plants, we constructed the co-occurrence networks based on the ASV matrices. Various topological attributes of the networks, including the number of nodes, number of edges, average degree, and mean clustering coefficient, revealed distinct ecological networks for both the rhizospheric and endospheric microbiomes (Fig. A–C). Specifically, the network complexity of the diseased rhizospheric microbiomes exceeded that of the healthy rhizospheric microbiomes, while the opposite was in endospheric microbiomes (Fig. A and B). Notably, the bacterial communities exhibited a higher network complexity than the fungal communities, regardless of the rhizosphere and root endophyte. The nodes, represented by the bacterial ASVs, were primarily associated with the phyla Actinobacteria, Proteobacteria, and Firmicutes, and the fungal ASVs were predominantly linked to the Ascomycota. Moreover, the network among microbial members demonstrated multiple relationships, characterized by predominantly positive edges (82–92%). To explore the community stability of both rhizospheric and endospheric microbiomes, we conducted a robustness analysis to assess the ability of the network to maintain the connectivity when certain nodes were damaged or removed (Fig. D). Interestingly, the rhizospheric microbiome network exhibited a greater stability than that of the endospheric microbiomes. Moreover, regardless of whether it was the rhizospheric or endospheric microbiome, the networks in healthy plants were more stable than those in diseased plants. Additionally, the fungal communities displayed a higher network stability than the bacterial communities (Fig. D). Rhizospheric and Endospheric Bacterial Function Predictions of the Healthy and Diseased Capsicum Plants The PICRUSt was utilized to elucidate the variations in bacterial potential functions between healthy and diseased rhizospheric and endophytic environments based on the KEGG comparative annotation. From our dataset, 185 tertiary pathways and 35 KEGG secondary pathways were identified. Among these pathways, the metabolism pathway exhibited the highest relative abundance across all the samples, followed by human diseases and organismal systems (Fig. ). The enrichment analyses revealed that changes in health status only significantly affected the biosynthesis of other secondary metabolites pathways of the endospheric microbiomes, which was found to be enriched in the health endophytes. In the rhizospheric microbiomes, the KEGG pathways associated with metabolism of carbohydrate and other amino acids, replication and repair, cellular community prokaryotes, and excretory systems were higher than those in endospheric microbiomes, regardless of the plant health status. Moreover, certain pathways such as translation and transcription in genetic information processing, signal transduction, and immune diseases and neurodegenerative diseases in human diseases were accumulated in the endospheric microbiomes, regardless of the plant health status. The occurrence of diseases increased the differences between some pathways in the rhizosphere and within endosphere. As compared to the endospheric microbiome, the pathways related to cardiovascular disease, and the digestive system increased in the rhizospheric microbiomes, while concurrently decreased pathways associated with lipid metabolism, membrane transport, cell growth and death, development and regeneration, and the sensory system pathways.   The rhizospheric microbiomes of healthy plants exhibited significantly higher bacterial richness than those of the diseased plants (Fig. A). The bacterial richness and phylogenetic diversity in rhizospheric microbiomes surpassed those in the endospheric microbiomes, regardless of the plant health status (Fig. A and B). Within both the endospheric and rhizospheric microbiomes, no remarkable disparities were detected in terms of fungal richness or phylogenetic diversity when comparing the healthy plants with the diseased ones. The community composition of the rhizospheric and endospheric microbiomes differed significantly between healthy and diseased plants, as indicated by the NMDS analysis, regardless of bacteria and fungi (Fig. C). Additionally, the community composition of rhizospheric microbiomes varied significantly from that of endospheric microbiomes, regardless of the plant health status. The location (fungi, R 2 = 0.35, P < 0.001; bacteria, R 2 = 0.26, P < 0.001) demonstrated a more pronounced effect on community composition than did plant pathological status (fungi, R 2 = 0.05; bacteria, R 2 = 0.08, P < 0.01) (Fig. C). To explore the underlying causes of community composition differences, the bacterial and fungal β-diversity analyses were conducted based on the Bray-Curtis and Sorensen distances. The β-diversity comprised species turnover and nestedness components, with species turnover contributed almost the majority of bacterial and fungal community succession (Fig. D and E), particularly in bacterial communities (0.6–0.9). In rhizospheric microbiomes, the fungal nestedness exceeded that in endospheric microbiomes, and the bacterial turnover was higher in the rhizospheric microbiomes than in the endospheric microbiomes, regardless of the plant health status.   The microbial phylogenetic classification revealed significant differences in the rhizospheric and endospheric microbiomes between healthy and diseased plants (Fig. F). Cladosporium was the main genus for rhizospheric microbiomes, and Fusarium was the main genus for endospheric microbiomes among fungal communities. In the healthy rhizosphere, the genus Aspergillus was enriched, and Acremonium was depleted compared to those in the diseased rhizosphere. The genus Streptomyces and Bacillus were the main taxa in all samples of bacterial communities, with the Gaiella being unique to the rhizosphere bacterial communities. In the diseased plants, Streptomyces and Bacillus were enriched in both the rhizosphere and root endosphere compared with the healthy plants. Furthermore, Streptomyces and Mycobacterium were enriched, and Nocardioides and Gemmatimonas were depleted in the root endosphere compared with the rhizosphere (Fig. F). Compared to the diseased rhizosphere, 13 fungal ASVs were enriched and 23 were depleted in the healthy rhizosphere (Fig. A). Similarly, in comparison with the diseased root endophyte, 14 fungal ASVs were found to be enriched while six were depleted in the healthy endophyte. Additionally, compared to the root endophyte, 31 fungal ASVs were enriched, and 14 were depleted in the diseased rhizosphere, and 44 fungal ASVs were enriched, and 60 were depleted in the healthy rhizosphere (Fig. A). The majority of the co-enriched fungal ASVs in the diseased root endophyte and rhizosphere belonged to the phylum Ascomycota (Fig. B and C). Similarly, compared with the diseased rhizosphere, 109 bacterial ASVs were enriched and 140 were depleted in the healthy rhizosphere (Fig. A). In contrast, compared to the diseased root endophyte, 87 bacterial ASVs were enriched and 71 were depleted in the healthy endophyte. Moreover, compared to the endophyte, 297 bacterial ASVs were enriched, and 152 were depleted in the diseased rhizosphere, whereas 267 were enriched, and 119 were depleted in the healthy rhizosphere (Fig. A). The majority of the co-enriched bacterial ASVs within the healthy root endophyte and rhizosphere were affiliated with the phyla Proteobacteria, Actinobacteria, and Firmicutes (Fig. B and C). A random forest model was implemented to identify the primary ASVs responsible for distinguishing between healthy and diseased plants in both the root endophyte and the rhizosphere. The model exhibited high levels of accuracy, with the error rate ranging from 16.67 to 33.33% (Fig. ). The bacterial indicators (ASVs) primarily belonged to the class Actinobacteria, Alphaproteobacteria, and Bacilli, and the fungal indicators were associated with Sordariomycetes, Eurotiomycetes, and Mortierellomycetes (Fig. ). Specific key indicators, namely bacterial ASV4651 and fungal ASV11, ASV285, and ASV614 along with ASV827, were found to be enriched within the healthy rhizosphere, whereas bacterial ASV456 and fungal ASV1655, ASV619, ASV1136, ASV168, and ASV467 were enriched in the diseased rhizosphere (Figs. , , A, and B). Similarly, the bacterial ASV1242, ASV2397, ASV693, and ASV4651, as well as fungal ASV192, ASV23, and ASV54, were enriched in the healthy root endophyte, and the bacterial ASV3141 and ASV1315, along with fungal ASV176, ASV5304, ASV841, ASV288, and ASV64, were enriched in the diseased endophyte (Figs. , , C, and D). Notably, the ASV4651 served as an indicator species and was enriched in both the healthy endophyte and rhizosphere. In addition, a random forest model was constructed to identify the primary indicators of both rhizospheric and endospheric microbiomes in healthy and diseased plants, achieving error rates ranging from 0 to 8.33% (Fig. ). The bacterial indicators mainly belonged to Alphaproteobacteria and Actinobacteria, and the fungal indicators belonged to Eurotiomycetes and Dothideomycetes (Fig. ). Most bacterial indicators were enriched in the healthy rhizosphere but not in the diseased rhizosphere, and most fungal indicators were enriched in both healthy and diseased endosphere.   The neutral community model provided an excellent fit to the microbial data in this study (Fig. A and B). The analysis revealed that the majority of ASVs adhered to the expected occurrence frequency, strongly indicating that stochastic processes played a preponderant role in governing the assembly of both the rhizospheric and endospheric microbiomes. The lower m values (0.002–0.013) suggested significant limitations in community diffusion across all the samples. Notably, the diffusion limitation, as reflected by the m value, was more pronounced in rhizospheric fungal communities than in the rhizospheric bacterial communities, indicating a greater impact of the dispersal limitations on fungal communities. Nevertheless, the lower R 2 values (0.048–0.415) implied that deterministic processes also played a relatively significant role in the community assembly. The fungal communities were observed to experience a more prominent influence from deterministic processes in contrast to bacterial communities.(Fig. A and B). Most β-NTI scores fell within the range of − 2 to 2, demonstrating the predominant influence of stochastic processes on the microbial community assembly (Fig. C and D). The β-NTI values revealed that the median values of healthy rhizospheric and endospheric microbiomes exceeded those of their diseased couterparts, with the endospheric microbiomes had higher median values than the rhizospheric ones. The null model analysis indicated distinct microbial assembly processes between the diseased and healthy plants, regardless of the rhizosphere and root endophyte (Fig. C and D). The homogenizing dispersal played a predominant role in shaping the endophytic fungal communities (> 75%), whereas the heterogeneous selection, ecological drift, and dispersal limitation had limited effects on the community assembly. Hence, a decline in plant pathological status amplified the impact of homogeneous selection on the community assembly of the rhizospheric and endospheric microbiomes.   To gain deeper insights into the community complexity of both rhizospheric and endospheric microbiomes in the healthy and diseased plants, we constructed the co-occurrence networks based on the ASV matrices. Various topological attributes of the networks, including the number of nodes, number of edges, average degree, and mean clustering coefficient, revealed distinct ecological networks for both the rhizospheric and endospheric microbiomes (Fig. A–C). Specifically, the network complexity of the diseased rhizospheric microbiomes exceeded that of the healthy rhizospheric microbiomes, while the opposite was in endospheric microbiomes (Fig. A and B). Notably, the bacterial communities exhibited a higher network complexity than the fungal communities, regardless of the rhizosphere and root endophyte. The nodes, represented by the bacterial ASVs, were primarily associated with the phyla Actinobacteria, Proteobacteria, and Firmicutes, and the fungal ASVs were predominantly linked to the Ascomycota. Moreover, the network among microbial members demonstrated multiple relationships, characterized by predominantly positive edges (82–92%). To explore the community stability of both rhizospheric and endospheric microbiomes, we conducted a robustness analysis to assess the ability of the network to maintain the connectivity when certain nodes were damaged or removed (Fig. D). Interestingly, the rhizospheric microbiome network exhibited a greater stability than that of the endospheric microbiomes. Moreover, regardless of whether it was the rhizospheric or endospheric microbiome, the networks in healthy plants were more stable than those in diseased plants. Additionally, the fungal communities displayed a higher network stability than the bacterial communities (Fig. D).   The PICRUSt was utilized to elucidate the variations in bacterial potential functions between healthy and diseased rhizospheric and endophytic environments based on the KEGG comparative annotation. From our dataset, 185 tertiary pathways and 35 KEGG secondary pathways were identified. Among these pathways, the metabolism pathway exhibited the highest relative abundance across all the samples, followed by human diseases and organismal systems (Fig. ). The enrichment analyses revealed that changes in health status only significantly affected the biosynthesis of other secondary metabolites pathways of the endospheric microbiomes, which was found to be enriched in the health endophytes. In the rhizospheric microbiomes, the KEGG pathways associated with metabolism of carbohydrate and other amino acids, replication and repair, cellular community prokaryotes, and excretory systems were higher than those in endospheric microbiomes, regardless of the plant health status. Moreover, certain pathways such as translation and transcription in genetic information processing, signal transduction, and immune diseases and neurodegenerative diseases in human diseases were accumulated in the endospheric microbiomes, regardless of the plant health status. The occurrence of diseases increased the differences between some pathways in the rhizosphere and within endosphere. As compared to the endospheric microbiome, the pathways related to cardiovascular disease, and the digestive system increased in the rhizospheric microbiomes, while concurrently decreased pathways associated with lipid metabolism, membrane transport, cell growth and death, development and regeneration, and the sensory system pathways.   Endospheric Microbiome Communities and Functions Characterize Plant Pathological Status Our data revealed a significant difference in the community composition, rather than the richness and phylogenetic diversity, of the endospheric microbiomes among the plants with different pathological status (Fig. ). This finding was consistent with those of previous studies , suggesting that the differences within the healthy and diseased endospheric microbiomes were primarily attributable to the changes in the community profiles. The changes in the community composition could be attributed to the turnover and nestedness . The β-diversity analysis in our study indicated that the turnover predominantly drove succession in the endospheric microbiomes (Fig. D and E). As plant health levels decreased, the fungal community turnover in the root endophyte exhibited an upward trend (Fig. D), suggesting the continuous exchange and replacement of species within the fungal communities during the pathogen invasion . In the exchanging and replacing process of communities, several bacterial ASVs, primarily belonging to Proteobacteria and Actinobacteria, could be depleted in the diseased root endophyte (Fig. A and C). Specifically, the ASV1243 (Actinobacteria), ASV2397 (Proteobacteria), and ASV693 (Proteobacteria) were identified as both endospheric indicator species and depleted in the diseased endophyte (Fig. B). The Proteobacteria and Actinobacteria could release or facilitate the uptake of potassium, phosphorus, and various micronutrients by plants, thereby bolstering plant defense against pathogen invasion . Our findings were consistent with previous research , indicating that neutral processes could predominantly shape the assembly of the plant endospheric microbiomes. Notably, the fungal community diffusion appeared to be more constrained than bacterial communities (Fig. ). The bacterial communities exhibited a lower susceptibility to dispersal limitations relative to fungi potentially due to their smaller body size . This suggested that the assembly of capsicum endospheric microbiomes may be driven by both the stochastic and deterministic processes, with stochastic processes playing a predominant role. Nonetheless, deterministic processes contributed more significantly to the assembly of healthy than the diseased endospheric microbiomes (Fig. A and B). This result highlighted the impact of plant pathological status on the presence, absence, and abundance of specific endospheric microbial taxa , which were likely influenced by the selective screening of host roots . The decreased plant health levels amplified the impact of homogeneous selection on microbial community assembly (Fig. C–D). This also infers a homogenization effect associated with biotic stress from capsicum blight disease that is similar to the impact of abiotic stressors, such as drought and salinity . Therefore, this homogenization effect may serve as a foundation for exploring the endospheric microbial assembly under capsicum blight stress. Compared to the healthy endophytes, the diseased endophytes exhibited lower connectivity and network stability (Fig. A–C), indicating less robustness of the community interactions . During the pathogen invasion, highly interconnected and modular microbiomes could enhance the plant immune system activation and accelerate the defense responses. Conversely, a lower microbial diversity may compromise the community stability due to the interactive effects on community invasion resistance . The bacterial functional predictions revealed an upregulation in the pathway of other secondary metabolites biosynthesis in healthy root endophyte (Fig. ). Throughout the long-term co-evolution of plants and pathogens, plants have developed various resistance mechanisms to prevent pathogen invasion . The changes in this pathway within the endospheric microbiomes may enhance the pathogen resistance and self-recovery ability of the host plant. Because plant resistance to pathogens is largely dependent on the synthesis of disease-resistant secondary metabolites, which are serve as biochemical barriers against pathogen infiltration and function as signaling molecules in plant defense responses . Notably, the production of these signaling substances may be related to specific microbial taxa enriched in root endophyte. For example, the metabolites of genus Actinomycetes , including actidione, anisomycin, and polyoxin, exhibit pathogen-inhibiting properties in soil and effectively induce systemic resistance in plants . As our results showed, the Actinomycetales ASV1242, not only served as an indicator of the endophytic bacterial community, but was also enriched in the healthy endophyte. Additionally, our study identified that the bacterial ASV693, functioning as an indicator species in the endosphere, was depleted in the diseased endophyte. The genus Burkholderia , to which the ASV693 belonged, can produce the plant hormone auxin, stimulate root growth, and secrete iron carriers, facilitating the acquisition of trace elements while producing compounds with antibacterial properties . Rhizospheric Microbiome Communities and Functions Characterize Plant Pathological Status Consistent with previous research , our data indicated that the rhizosphere of healthy plants exhibited a higher microbial richness and phylogenetic diversity than that of diseased plants (Fig. A and B). Generally, a more diverse microbial community possesses a greater capability to regulate or reduce pathogens. The decreases in richness and phylogenetic diversity may facilitate the infiltration of potential pathogens into soils or plant-associated microbiomes . Furthermore, increased diversity of rhizospheric microbiome can enhance interspecies interactions, leading to the formation of a more stable ecosystem. This, in turn, contributes to the production of a greater array of antimicrobial substances, and then enhance the inhibitory effect against pathogen . These findings underscore the pivotal roles of rhizospheric microbiome in maintaining plant health and enhancing plant resistance to environmental stress. Meanwhile, they may provide a novel perspective for further understanding of plant-microbe interactions. Similarly, the changes in plant pathological status significantly modified the composition of rhizospheric microbiomes (Fig. C). Previous studies have linked reduced microbial diversity in the rhizosphere and distinct community shifts to disease occurrence  However, our data revealed no significant differences in the contributions of turnover and nesteness to the overall microbial β-diversity between the healthy and diseased rhizosphere. Therefore, the changes in the rhizospheric microbial community composition may be attributed to a few microbial taxa rather than to the population as a whole. Previous studies have demonstrated a higher abundance of Aspergillus species in the rhizosphere of tobacco plants with better health . Our results highlighted this phenomenon in the capsicum plants (Fig. F). The Aspergillus species have exhibited antagonistic effects against various pathogens, enhancing host disease resistance . Conversely, the members of Streptomyces and Bacillus were significantly enriched in the diseased capsicum rhizosphere (Fig. F). Streptomyces and Bacillus are antibiotic bacterial taxa  that can confer self-resistance in capsicum against pathogenic fungi. Considering the inherent defense mechanisms of soil and plants against pathogens, the diseased plants can recruit the Streptomyces and Bacillus species to combat pathogens, leading to their enrichment in the diseased rhizosphere . In contrast to the endospheric microbiomes, the diseased capsicum rhizosphere exhibited the enrichment with more microbial taxa than the healthy rhizosphere (Figs. A and A). This demonstrated that the enrichment screening process of microorganisms within the plant per se mitigates the pathogen stress from rhizosphere to the root endosphere . To date, the core microbial taxa of plants, whether in the rhizosphere, endosphere, or phyllosphere, have been primarily defined based on the taxonomic markers. Our results indicated that the core bacterial ASVs in the rhizosphere mainly belonged to Alphaproteobacteria, Bacilli, and Actinobacteria, and the core fungal ASVs belonged to Sordariomycetes, Eurotiomycetes, and Mortierellomycetes. Previous studies have demonstrated the disease prevention and growth-promoting capabilities of these taxa . Consistent with previous literature , our findings suggested that the stochastic processes predominantly governed the community assembly of the capsicum rhizosphere microbiomes (Fig. ). The deterministic processes can enhance the ecological functions of microbial communities under specific environmental conditions, whereas the stochastic processes could generate diverse functions to maintain the microbial community stability . This means that random factors, such as microbial diffusion, migration, accidental colonization, and extinction, play a more critical and dominant role in the formation and construction of rhizosphere microbial communities of capsicum, compared with deterministic factors (such as specific environmental selection pressure, directional interactions between species, etc.). The composition and structure of the community are largely shaped by these unpredictable random events, and its change and development have high uncertainty and randomness . Similar to the diseased endophytic microbiomes, there was an increase in the effects of the homogeneous selection on community assembly and a decrease in homogenizing dispersal in the diseased rhizosphere microbiomes (Fig. C and D). This indicated that under pathogen stress, the deterministic processes increased, whereas the stochastic processes decreased. Compared with the healthy plants, the diseased rhizosphere microbiomes exhibited a higher complexity but a lower stability in their networks, with a larger proportion of bacterial taxa (Fig. ). Research has demonstrated that cooperative and competitive interactions among the microbial species and network modularity could influence the community stability . Under the pathogen stress, the rhizosphere microbiomes underwent various responses to enhance the host resistance, leading to the intensified competition and more complex relationships among the microbial species . When the species relationships become complex and variable, exceeding a critical threshold in terms of species number, connectivity, or interaction strength, the ecosystem becomes unstable, potentially reducing community stability in resisting pathogen pressures . However, compared to certain previous studies , our study did not observe functional changes in the rhizosphere bacteria in response to the pathogen invasion. The changes in the rhizosphere microbial communities during the pathogen invasion primarily stemmed from the strong host selectivity, and the functional responses of the rhizosphere to plant health levels may lag behind changes in community composition . Differentiation of Endospheric and Rhizospheric Microbiomes Predicts Plant Pathological Status Endospheric and rhizospheric microbiomes may be similar and synchronized to a certain extent with the development of host plants. However, under the conditions of inhibited plant growth, these microbiomes may respond to the stress via different pathways, degrees, or timing. Consistent with previous research , our findings indicated that the microbial communities in the capsicum rhizosphere were more diverse than those in root endophytes, regardless of the plant pathological status (Fig. A). It is widely accepted that microbial species richness gradually decreases from the soil to endophytic compartments because of the strong selective pressure exerted by plants . The root endophytic microorganisms can be primarily recruited from the rhizosphere communities , which may explain the greater diversity of rhizospheric microbiomes than of endospheric microbiomes. However, there are few studies comparing the differentiation of rhizospheric and endophytic microbial communities of capsicum plants, and more studies on rhizosphere microorganisms . The evident compartmentalization existed between the community profiles of the endospheric and rhizospheric microbiomes (Fig. C) . Our data also indicated that the differences between the endospheric and rhizospheric microbiomes were more pronounced in bacteria than in fungi (Figs. , and ). This suggested a robust connection between rhizospheric and endospheric fungal communities, whereas the rhizospheric bacterial communities appeared to be more susceptible by environmental factors than the host plant . Furthermore, our results indicated a reduction in the disparity of bacterial diversity between the endospheric and rhizospheric regions as plants transitioned from a healthy to diseased state (Fig. ). Compared to the endospheric microbiomes, rhizospheric microbiomes harbored a greater number of special microbial ASVs, particularly in healthy plants (Figs. and ). Similarly, the core bacterial ASVs distinguishing the endosphere from the rhizospheric microbiomes predominantly belonged to Actinobacteria and Alphaproteobacteria, whereas core fungal ASVs belonged to Sordariomycetes, Eurotiomycetes, and Mortierellomycetes (Fig. S3). The Proteobacteria and Actinobacteria, primarily eutrophic bacteria, exhibit the enhanced competitiveness in environments rich in organic resources, and there are more plant-promoting bacteria in these categories . The strong response of the fungal groups in the root endophyte to blight, possibly because they are important consumers of subsurface plant-derived carbon inputs. Generally, the root endospheric fungi gradually release the plant-derived carbon into the rhizosphere for microbial metabolic utilization . After the pathogen-induced stress, the endospheric fungi may modulate the secretion of plant-derived carbon sources through the changes in their metabolisms and functions to synergistically respond to stress alongside the rhizosphere microbiome. The microbial assembly in both the rhizosphere and endosphere was affected by the stochastic and deterministic processes, with the stochastic processes play a dominant role (Fig. ) . However, certain factors such as heterogeneous selection, ecological drift, and dispersal restriction have limited effects on the endospheric community assembly. Microbial network characteristics varies significantly depending on the habitats. Our findings, consistent with previous research , demonstrated that the rhizospheric microbiomes exhibited higher network stability and complexity than the endospheric microbiomes (Fig. ). Given that numerous endophytes are usually recruited from the rhizosphere, the rhizospheric microbiomes could dynamically respond to the rhizospheric environmental, thereby influencing the subsequent responses of root endophytes to rhizospheric microbial dynamics . These findings can elucidate why the complexity of rhizospheric microbial networks may surpass that of the endophytic networks. Significant disparities in the functional pathways of rhizospheric and endospheric microbiomes in different states were observed (Fig. ). Compared with the rhizospheric microbiomes, the pathways of neurodegenerative disease and immune disease accumulate in the endospheric microbiome, which indicates that the plant is more likely to respond to potential threats from pathogen, such as immunity .   Our data revealed a significant difference in the community composition, rather than the richness and phylogenetic diversity, of the endospheric microbiomes among the plants with different pathological status (Fig. ). This finding was consistent with those of previous studies , suggesting that the differences within the healthy and diseased endospheric microbiomes were primarily attributable to the changes in the community profiles. The changes in the community composition could be attributed to the turnover and nestedness . The β-diversity analysis in our study indicated that the turnover predominantly drove succession in the endospheric microbiomes (Fig. D and E). As plant health levels decreased, the fungal community turnover in the root endophyte exhibited an upward trend (Fig. D), suggesting the continuous exchange and replacement of species within the fungal communities during the pathogen invasion . In the exchanging and replacing process of communities, several bacterial ASVs, primarily belonging to Proteobacteria and Actinobacteria, could be depleted in the diseased root endophyte (Fig. A and C). Specifically, the ASV1243 (Actinobacteria), ASV2397 (Proteobacteria), and ASV693 (Proteobacteria) were identified as both endospheric indicator species and depleted in the diseased endophyte (Fig. B). The Proteobacteria and Actinobacteria could release or facilitate the uptake of potassium, phosphorus, and various micronutrients by plants, thereby bolstering plant defense against pathogen invasion . Our findings were consistent with previous research , indicating that neutral processes could predominantly shape the assembly of the plant endospheric microbiomes. Notably, the fungal community diffusion appeared to be more constrained than bacterial communities (Fig. ). The bacterial communities exhibited a lower susceptibility to dispersal limitations relative to fungi potentially due to their smaller body size . This suggested that the assembly of capsicum endospheric microbiomes may be driven by both the stochastic and deterministic processes, with stochastic processes playing a predominant role. Nonetheless, deterministic processes contributed more significantly to the assembly of healthy than the diseased endospheric microbiomes (Fig. A and B). This result highlighted the impact of plant pathological status on the presence, absence, and abundance of specific endospheric microbial taxa , which were likely influenced by the selective screening of host roots . The decreased plant health levels amplified the impact of homogeneous selection on microbial community assembly (Fig. C–D). This also infers a homogenization effect associated with biotic stress from capsicum blight disease that is similar to the impact of abiotic stressors, such as drought and salinity . Therefore, this homogenization effect may serve as a foundation for exploring the endospheric microbial assembly under capsicum blight stress. Compared to the healthy endophytes, the diseased endophytes exhibited lower connectivity and network stability (Fig. A–C), indicating less robustness of the community interactions . During the pathogen invasion, highly interconnected and modular microbiomes could enhance the plant immune system activation and accelerate the defense responses. Conversely, a lower microbial diversity may compromise the community stability due to the interactive effects on community invasion resistance . The bacterial functional predictions revealed an upregulation in the pathway of other secondary metabolites biosynthesis in healthy root endophyte (Fig. ). Throughout the long-term co-evolution of plants and pathogens, plants have developed various resistance mechanisms to prevent pathogen invasion . The changes in this pathway within the endospheric microbiomes may enhance the pathogen resistance and self-recovery ability of the host plant. Because plant resistance to pathogens is largely dependent on the synthesis of disease-resistant secondary metabolites, which are serve as biochemical barriers against pathogen infiltration and function as signaling molecules in plant defense responses . Notably, the production of these signaling substances may be related to specific microbial taxa enriched in root endophyte. For example, the metabolites of genus Actinomycetes , including actidione, anisomycin, and polyoxin, exhibit pathogen-inhibiting properties in soil and effectively induce systemic resistance in plants . As our results showed, the Actinomycetales ASV1242, not only served as an indicator of the endophytic bacterial community, but was also enriched in the healthy endophyte. Additionally, our study identified that the bacterial ASV693, functioning as an indicator species in the endosphere, was depleted in the diseased endophyte. The genus Burkholderia , to which the ASV693 belonged, can produce the plant hormone auxin, stimulate root growth, and secrete iron carriers, facilitating the acquisition of trace elements while producing compounds with antibacterial properties .   Consistent with previous research , our data indicated that the rhizosphere of healthy plants exhibited a higher microbial richness and phylogenetic diversity than that of diseased plants (Fig. A and B). Generally, a more diverse microbial community possesses a greater capability to regulate or reduce pathogens. The decreases in richness and phylogenetic diversity may facilitate the infiltration of potential pathogens into soils or plant-associated microbiomes . Furthermore, increased diversity of rhizospheric microbiome can enhance interspecies interactions, leading to the formation of a more stable ecosystem. This, in turn, contributes to the production of a greater array of antimicrobial substances, and then enhance the inhibitory effect against pathogen . These findings underscore the pivotal roles of rhizospheric microbiome in maintaining plant health and enhancing plant resistance to environmental stress. Meanwhile, they may provide a novel perspective for further understanding of plant-microbe interactions. Similarly, the changes in plant pathological status significantly modified the composition of rhizospheric microbiomes (Fig. C). Previous studies have linked reduced microbial diversity in the rhizosphere and distinct community shifts to disease occurrence  However, our data revealed no significant differences in the contributions of turnover and nesteness to the overall microbial β-diversity between the healthy and diseased rhizosphere. Therefore, the changes in the rhizospheric microbial community composition may be attributed to a few microbial taxa rather than to the population as a whole. Previous studies have demonstrated a higher abundance of Aspergillus species in the rhizosphere of tobacco plants with better health . Our results highlighted this phenomenon in the capsicum plants (Fig. F). The Aspergillus species have exhibited antagonistic effects against various pathogens, enhancing host disease resistance . Conversely, the members of Streptomyces and Bacillus were significantly enriched in the diseased capsicum rhizosphere (Fig. F). Streptomyces and Bacillus are antibiotic bacterial taxa  that can confer self-resistance in capsicum against pathogenic fungi. Considering the inherent defense mechanisms of soil and plants against pathogens, the diseased plants can recruit the Streptomyces and Bacillus species to combat pathogens, leading to their enrichment in the diseased rhizosphere . In contrast to the endospheric microbiomes, the diseased capsicum rhizosphere exhibited the enrichment with more microbial taxa than the healthy rhizosphere (Figs. A and A). This demonstrated that the enrichment screening process of microorganisms within the plant per se mitigates the pathogen stress from rhizosphere to the root endosphere . To date, the core microbial taxa of plants, whether in the rhizosphere, endosphere, or phyllosphere, have been primarily defined based on the taxonomic markers. Our results indicated that the core bacterial ASVs in the rhizosphere mainly belonged to Alphaproteobacteria, Bacilli, and Actinobacteria, and the core fungal ASVs belonged to Sordariomycetes, Eurotiomycetes, and Mortierellomycetes. Previous studies have demonstrated the disease prevention and growth-promoting capabilities of these taxa . Consistent with previous literature , our findings suggested that the stochastic processes predominantly governed the community assembly of the capsicum rhizosphere microbiomes (Fig. ). The deterministic processes can enhance the ecological functions of microbial communities under specific environmental conditions, whereas the stochastic processes could generate diverse functions to maintain the microbial community stability . This means that random factors, such as microbial diffusion, migration, accidental colonization, and extinction, play a more critical and dominant role in the formation and construction of rhizosphere microbial communities of capsicum, compared with deterministic factors (such as specific environmental selection pressure, directional interactions between species, etc.). The composition and structure of the community are largely shaped by these unpredictable random events, and its change and development have high uncertainty and randomness . Similar to the diseased endophytic microbiomes, there was an increase in the effects of the homogeneous selection on community assembly and a decrease in homogenizing dispersal in the diseased rhizosphere microbiomes (Fig. C and D). This indicated that under pathogen stress, the deterministic processes increased, whereas the stochastic processes decreased. Compared with the healthy plants, the diseased rhizosphere microbiomes exhibited a higher complexity but a lower stability in their networks, with a larger proportion of bacterial taxa (Fig. ). Research has demonstrated that cooperative and competitive interactions among the microbial species and network modularity could influence the community stability . Under the pathogen stress, the rhizosphere microbiomes underwent various responses to enhance the host resistance, leading to the intensified competition and more complex relationships among the microbial species . When the species relationships become complex and variable, exceeding a critical threshold in terms of species number, connectivity, or interaction strength, the ecosystem becomes unstable, potentially reducing community stability in resisting pathogen pressures . However, compared to certain previous studies , our study did not observe functional changes in the rhizosphere bacteria in response to the pathogen invasion. The changes in the rhizosphere microbial communities during the pathogen invasion primarily stemmed from the strong host selectivity, and the functional responses of the rhizosphere to plant health levels may lag behind changes in community composition .   Endospheric and rhizospheric microbiomes may be similar and synchronized to a certain extent with the development of host plants. However, under the conditions of inhibited plant growth, these microbiomes may respond to the stress via different pathways, degrees, or timing. Consistent with previous research , our findings indicated that the microbial communities in the capsicum rhizosphere were more diverse than those in root endophytes, regardless of the plant pathological status (Fig. A). It is widely accepted that microbial species richness gradually decreases from the soil to endophytic compartments because of the strong selective pressure exerted by plants . The root endophytic microorganisms can be primarily recruited from the rhizosphere communities , which may explain the greater diversity of rhizospheric microbiomes than of endospheric microbiomes. However, there are few studies comparing the differentiation of rhizospheric and endophytic microbial communities of capsicum plants, and more studies on rhizosphere microorganisms . The evident compartmentalization existed between the community profiles of the endospheric and rhizospheric microbiomes (Fig. C) . Our data also indicated that the differences between the endospheric and rhizospheric microbiomes were more pronounced in bacteria than in fungi (Figs. , and ). This suggested a robust connection between rhizospheric and endospheric fungal communities, whereas the rhizospheric bacterial communities appeared to be more susceptible by environmental factors than the host plant . Furthermore, our results indicated a reduction in the disparity of bacterial diversity between the endospheric and rhizospheric regions as plants transitioned from a healthy to diseased state (Fig. ). Compared to the endospheric microbiomes, rhizospheric microbiomes harbored a greater number of special microbial ASVs, particularly in healthy plants (Figs. and ). Similarly, the core bacterial ASVs distinguishing the endosphere from the rhizospheric microbiomes predominantly belonged to Actinobacteria and Alphaproteobacteria, whereas core fungal ASVs belonged to Sordariomycetes, Eurotiomycetes, and Mortierellomycetes (Fig. S3). The Proteobacteria and Actinobacteria, primarily eutrophic bacteria, exhibit the enhanced competitiveness in environments rich in organic resources, and there are more plant-promoting bacteria in these categories . The strong response of the fungal groups in the root endophyte to blight, possibly because they are important consumers of subsurface plant-derived carbon inputs. Generally, the root endospheric fungi gradually release the plant-derived carbon into the rhizosphere for microbial metabolic utilization . After the pathogen-induced stress, the endospheric fungi may modulate the secretion of plant-derived carbon sources through the changes in their metabolisms and functions to synergistically respond to stress alongside the rhizosphere microbiome. The microbial assembly in both the rhizosphere and endosphere was affected by the stochastic and deterministic processes, with the stochastic processes play a dominant role (Fig. ) . However, certain factors such as heterogeneous selection, ecological drift, and dispersal restriction have limited effects on the endospheric community assembly. Microbial network characteristics varies significantly depending on the habitats. Our findings, consistent with previous research , demonstrated that the rhizospheric microbiomes exhibited higher network stability and complexity than the endospheric microbiomes (Fig. ). Given that numerous endophytes are usually recruited from the rhizosphere, the rhizospheric microbiomes could dynamically respond to the rhizospheric environmental, thereby influencing the subsequent responses of root endophytes to rhizospheric microbial dynamics . These findings can elucidate why the complexity of rhizospheric microbial networks may surpass that of the endophytic networks. Significant disparities in the functional pathways of rhizospheric and endospheric microbiomes in different states were observed (Fig. ). Compared with the rhizospheric microbiomes, the pathways of neurodegenerative disease and immune disease accumulate in the endospheric microbiome, which indicates that the plant is more likely to respond to potential threats from pathogen, such as immunity .   Our data revealed that the bacterial communities exhibited a higher diversity in the healthy capsicum rhizosphere than in the diseased one. Concurrently, both the fungal and bacterial communities in the rhizosphere were more diverse than those in the root endophytes, regardless of plant health status. The β-diversity analysis highlighted that the turnover predominantly drove the succession in the endospheric microbiomes, with the fungal turnover in the root endophyte increasing with declining plant health. The overall assembly of the microbial community within all samples was influenced by a combination of the stochastic and deterministic processes, along with stochastic processes played a dominant role. Certain taxa belonging to Actinobacteria or Proteobacteria served as the indicators of the endospheric bacterial community, while being depleted in the diseased endophyte. Some taxa belonging to Aspergillus were depleted, while taxa such as Streptomyces and Bacillus were enriched in the diseased rhizospheres. The diseased root endophyte exhibited the lower network complexity and stability than the healthy endophyte. Meanwhile, the diseased rhizosphere displayed the higher complexity but lower stability. Additionally, the pathway for the other secondary metabolites biosynthesis was significantly upregulated in the healthy endophyte compared with the diseased endophyte. These results indicated the distinct responses of the rhizospheric and endospheric microbiome communities and their functions to the change of plant pathological status. Furthermore, we suggested the significance of deciphering the underlying mechanisms that driving these differences for a more accurate understanding of plant pathological status.   Below is the link to the electronic supplementary material. Supplementary file1 (DOCX 12.8 MB)   