Long-term spatiotemporal evolution of drug-resistant Mycobacterium tuberculosis in China Authors: Yiwang Chen, Jialei Liang, Dongxin Liu, Peng Xu, Qi Jiang, Tingting Yang, Qingyun Liu, Howard E. Takiff, Sebastien Gagneux, Qian Gao Published: 2026 ABSTRACT Antibiotics have been used to treat tuberculosis for over 80 years, yet the long-term evolutionary dynamics of Mycobacterium tuberculosis (Mtb) under antibiotic pressure remain poorly characterized at the population level. Here, we analyze more than 18,000 available Mtb genomes to reconstruct the temporal and spatial evolution of drug resistance across China. We observe that resistance mutations to different drugs arose repeatedly, giving rise to hundreds to over a thousand small drug-resistant clades that mostly emerged within the past two decades. Once established, transmission of these clades was predominantly sustained within provinces, but could expand geographically with increased human mobility and bacterial fitness. In addition, we integrate published genomic and CRISPRi screening data to identify mutations associated with the emergence and transmission of drug resistance. Our study highlights the importance of human migration and bacterial adaptation in shaping local epidemics of drug-resistant tuberculosis in China. Introduction Drug-resistant tuberculosis (TB) remains a major obstacle to global TB control. The latest 2025 Global TB Report estimated over 390,000 new cases of multidrug-resistant or rifampicin-resistant TB (MDR/RR-TB)1, most arising in a small number of high-burden countries1. Understanding the temporal and spatial evolutionary patterns of drug resistance in these settings can inform strategies to minimize the emergence and spread of new drug resistance. Although antibiotics have been used to treat TB for more than 80 years, the long-term evolutionary dynamics of Mycobacterium tuberculosis (Mtb) under antibiotic pressure remain poorly characterized at the population level. China carries the world’s third-highest MDR/RR-TB burden, accounting for 7.3% of global cases annually1, and its relatively self-contained bacterial population—with limited recent intermixing—provides an ideal setting to investigate the evolutionary trajectory of drug resistance in Mtb2. Previous studies indicate that the acquisition and spread of drug-resistant Mtb vary in different regions of China. In Tibet, the MDR-TB epidemic is dominated by a few highly successful clonal expansions of particular Mtb genotypes3, whereas in eastern China MDR-TB is sustained by the repeated appearance of numerous small, less successful clusters4–6. At the national scale, however, it remains unclear which of these patterns best captures the dynamics of drug resistance. Within individual regions, spatial distance has been recognized as a major determinant of drug-resistant Mtb transmission7,8, but China’s socioeconomic development over the past 40 years has resulted in an increased population mobility and the potential for cross-regional spread, raising questions about the extent to which geographical distance continues to constrain transmission. Moreover, after more than 80 years of antibiotic use, it is unknown whether Mtb populations in China have evolved adaptive strategies that facilitate the emergence and transmission of resistance. Tracing the emergence and transmission of Mtb drug resistance in China over time poses two key challenges. First, drug-resistant bacterial subgroups must be precisely delineated. Clustering methods based on fixed genetic distance thresholds are widely used, but these thresholds vary across regions and are not universally applicable3,9,10. Second, transmission dynamics must be reliably characterized, which generally requires whole-genome sequencing of Mtb isolates. However, regional differences in the availability of genome sequencing can introduce bias into national datasets and obscure the true landscape of resistance transmission. To address these challenges, we delineated bacterial subgroups by integrating drug resistance mutation profiles with phylogenetic trees. We then applied a statistical framework that estimates the relative risk (RR) of transmission in specific subgroups while correcting for heterogeneity in sequencing coverage across different regions. Using this framework, we analyzed more than 18,000 whole-genome sequences of Mtb isolates across China to trace the origins and transmission dynamics of drug-resistant strains and identify potential drivers of drug resistance emergence and spread. Results The genetic landscape of Mtb in China To investigate the Mtb population structure and drug resistance dynamics, we assembled the largest WGS dataset of Chinese Mtb isolates to date. After quality control, the dataset retained 18,118 isolates collected between 1998 and 2021 from 51 studies spanning all 31 provinces of mainland China (Fig. 1a). Over the past two decades, the reporting of drug-susceptible genomes has steadily increased, whereas reporting of drug-resistant genomes has remained largely stable, with notable increases only during two national surveys (Fig. 1b). Although all four major Mtb lineages (L1-L4) were represented, 13,745 (75.9%) belonged to lineage 2, and 4,208 (23.2%) to lineage 4, while only 97 (0.5%) and 68 (0.4%) belonged to lineages 3 and 1, respectively (Fig. 1c). Mtb populations across China showed overall genetic homogeneity (Fig. 1d), but the degree of regional divergence increased progressively with geographic distance (Fig. 1e), indicating localized effects of geographic isolation.Fig. 1Descriptive summary of 18,118 M. tuberculosis isolates in China.a, Numbers of Mtb isolates in this study sampled from each province in mainland China between 1998 and 2021. The map was generated in R (v4.1.2) and provincial boundaries were obtained from AMap (https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json). b, Temporal variation in the numbers of genotypically drug-susceptible (DS) and drug-resistant (DR) isolates as determined by genotypic DST. The Kendall’s τ coefficient is shown, indicating the strength and direction of monotonic trends for each series, is shown nearby. Trend significance was assessed using the Mann–Kendall test (two-sided). c, Population structure of Mtb isolates across 31 provinces in mainland China. d, Principal component analysis (PCA) of 18,118 Mtb genomes. Each genome is colored according to the major geographic region of sampling. e, Correlation between pairwise genetic differentiation (Fst) and geographic distance among provincial Mtb populations. Error bands represent the 95% confidence interval. Statistical significance was assessed by Mantel test (two-sided). Sublineage nomenclature follows our divergence-based convention; L2.2 and L2.3 correspond to L2.2.2 (ancient Beijing) and L2.2.1 (modern Beijing) in Napier et al42. Descriptive summary of 18,118 M. tuberculosis isolates in China. a, Numbers of Mtb isolates in this study sampled from each province in mainland China between 1998 and 2021. The map was generated in R (v4.1.2) and provincial boundaries were obtained from AMap (https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json). b, Temporal variation in the numbers of genotypically drug-susceptible (DS) and drug-resistant (DR) isolates as determined by genotypic DST. The Kendall’s τ coefficient is shown, indicating the strength and direction of monotonic trends for each series, is shown nearby. Trend significance was assessed using the Mann–Kendall test (two-sided). c, Population structure of Mtb isolates across 31 provinces in mainland China. d, Principal component analysis (PCA) of 18,118 Mtb genomes. Each genome is colored according to the major geographic region of sampling. e, Correlation between pairwise genetic differentiation (Fst) and geographic distance among provincial Mtb populations. Error bands represent the 95% confidence interval. Statistical significance was assessed by Mantel test (two-sided). Sublineage nomenclature follows our divergence-based convention; L2.2 and L2.3 correspond to L2.2.2 (ancient Beijing) and L2.2.1 (modern Beijing) in Napier et al42. Heterogeneity across drug-resistance mutations and subgroups Based on genotypic drug susceptibility testing (gDST), 5560 (30.7%) of the 18,118 isolates were resistant to at least one drug, including 2600 (14.4%) that were resistant to both isoniazid and rifampicin and therefore multidrug-resistant (MDR) (Fig. 2a). The distribution of resistance mutations across anti-TB drugs followed three distinct patterns (Fig. 2b). For some drugs, such as isoniazid, rifampicin, and streptomycin, a single mutation predominated. For others, such as ethambutol and fluoroquinolones, resistance was largely caused by one of two principal mutations. In contrast, pyrazinamide resistance showed no dominant mutation, with multiple variants identified at low frequencies.Fig. 2Identification of drug-resistant strains and delineation of resistant subgroups.a, Phylogenetic tree of 5560 genotypically drug-resistant Mtb isolates included in this study. Sublineage nomenclature follows our divergence-based convention; L2.2 and L2.3 correspond to L2.2.2 (ancient Beijing) and L2.2.1 (modern Beijing) in Napier et al42. b, Landscape of mutations conferring resistance to anti-TB drugs. c, Distribution of resistant subgroups across anti-TB drugs. d, Comparison of resistant subgroup sizes (left) and within-subgroup genetic diversity (right) across anti-TB drugs. Red vertical lines indicate median values. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), and fluoroquinolone (FLQ). Identification of drug-resistant strains and delineation of resistant subgroups. a, Phylogenetic tree of 5560 genotypically drug-resistant Mtb isolates included in this study. Sublineage nomenclature follows our divergence-based convention; L2.2 and L2.3 correspond to L2.2.2 (ancient Beijing) and L2.2.1 (modern Beijing) in Napier et al42. b, Landscape of mutations conferring resistance to anti-TB drugs. c, Distribution of resistant subgroups across anti-TB drugs. d, Comparison of resistant subgroup sizes (left) and within-subgroup genetic diversity (right) across anti-TB drugs. Red vertical lines indicate median values. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), and fluoroquinolone (FLQ). To capture high-resolution patterns of the emergence and spread of Mtb drug resistance in China, we delineated resistant subgroups by clustering phylogenetically adjacent isolates sharing the same drug-resistance mutation and pruning distant outliers based on pairwise genetic distances within each subgroup. The number of resistant subgroups varied markedly across anti-TB drugs, ranging from 1635 for isoniazid to 363 for pyrazinamide (Fig. 2c). Although subgroup counts differed, their sizes were broadly comparable with the different drugs (Kruskal-Wallis test, p = 0.82), ranging from 2–24 isolates and averaging two per subgroup (Fig. 2d). The within-subgroup diversity differed significantly across drugs (Kruskal-Wallis test, p < 0.001), but the pairwise genetic distances within the drug-resistant subgroups never exceeded 47 SNPs (Fig. 2d). Isoniazid- and streptomycin-resistant subgroups exhibited markedly higher mean pairwise distances than those of other drugs (Fig. 2d and Supplementary Data 1), indicating that these resistances may have emerged earlier, leading to greater genetic diversification within these subgroups. Long-term origins and lineage-specific patterns of resistance emergence To investigate the timing of resistance emergence, we inferred the dates of the most recent common ancestor (MRCA) for all drug-resistant subgroups. Overall, 33.2% (1883/5670) of resistant subgroups arose more than two decades prior to their most recent sampling (Fig. 3a). Streptomycin-resistant subgroups had the highest proportion of subgroups originating more than 20 years before sampling 38.3% (468/1223), followed by the isoniazid-resistant subgroups 37.9% (620/1,635). Fluoroquinolone-resistant subgroups exhibited the lowest proportion of subgroups with origins more than 20 years prior to sampling 15.2% (58/381).Fig. 3Fine-scale inference of drug-resistant Mtb origins in China.a, Distribution of the estimated ages of the most recent common ancestors (MRCAs) of subgroups resistant to different anti-TB drugs. Number of drug-resistant subgroups identified in the analysis: INH (N = 1635), RIF (N = 1291), EMB (N = 777), PZA (N = 363), STR (N = 1223), FLQ (N = 381). Boxes show the 1st and 3rd quartiles, with the median indicated by a horizontal line; whiskers represent median ± 1.5 × interquartile range (IQR). b, Pairwise comparisons of MRCA ages of subgroups resistant to different anti-TB drugs across distinct lineages and sublineages. Statistical significance was assessed by Wilcoxon tests (two-sided) with Benjamini–Hochberg correction for multiple comparisons. Numbers in the matrix denote FDR-adjusted P values. For each drug, resistance emergence time is represented by the median MRCA age across all resistant subgroups. c, Correlation between the estimated emergence time of resistance and the year each drug was introduced into clinical use across distinct lineages and sublineages. For each drug, resistance emergence time is represented by the median MRCA age across all resistant subgroups. For visualization clarity, separate y-axis scales were used for different drugs to minimize point overlap; the drug introduction year itself is fixed across lineages and sublineages. Error bands represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided). Lineage 2 (L2) includes all defined sublineages (2.1, 2.2, and 2.3). Sublineage nomenclature follows our divergence-based convention; L2.2 and L2.3 correspond to L2.2.2 (ancient Beijing) and L2.2.1 (modern Beijing) in Napier et al42. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), fluoroquinolone (FLQ). Fine-scale inference of drug-resistant Mtb origins in China. a, Distribution of the estimated ages of the most recent common ancestors (MRCAs) of subgroups resistant to different anti-TB drugs. Number of drug-resistant subgroups identified in the analysis: INH (N = 1635), RIF (N = 1291), EMB (N = 777), PZA (N = 363), STR (N = 1223), FLQ (N = 381). Boxes show the 1st and 3rd quartiles, with the median indicated by a horizontal line; whiskers represent median ± 1.5 × interquartile range (IQR). b, Pairwise comparisons of MRCA ages of subgroups resistant to different anti-TB drugs across distinct lineages and sublineages. Statistical significance was assessed by Wilcoxon tests (two-sided) with Benjamini–Hochberg correction for multiple comparisons. Numbers in the matrix denote FDR-adjusted P values. For each drug, resistance emergence time is represented by the median MRCA age across all resistant subgroups. c, Correlation between the estimated emergence time of resistance and the year each drug was introduced into clinical use across distinct lineages and sublineages. For each drug, resistance emergence time is represented by the median MRCA age across all resistant subgroups. For visualization clarity, separate y-axis scales were used for different drugs to minimize point overlap; the drug introduction year itself is fixed across lineages and sublineages. Error bands represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided). Lineage 2 (L2) includes all defined sublineages (2.1, 2.2, and 2.3). Sublineage nomenclature follows our divergence-based convention; L2.2 and L2.3 correspond to L2.2.2 (ancient Beijing) and L2.2.1 (modern Beijing) in Napier et al42. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), fluoroquinolone (FLQ). When examining the relative order of resistance acquisition across lineages, isoniazid consistently emerged first, whereas fluoroquinolone resistance was invariably acquired last (Fig. 3a, b). Beyond this general trend, clear lineage-specific differences were observed. In L2, the median MRCA ages of the streptomycin-resistant subgroups were comparable to those of isoniazid, while in L4 they were significantly younger (Fig. 3a, b; 2007 [2002–2011] vs. 2005 [1998–2007]; Wilcoxon rank-sum test with Benjamini–Hochberg FDR p = 0.049). A similar lineage-dependent pattern was found for pyrazinamide: in L2 its median MRCA age was significantly younger than that of isoniazid (Fig. 3a, b; 2005 [1992–2010] vs. 2002 [1984–2009]; Wilcoxon rank-sum test with Benjamini–Hochberg FDR p < 0.001), whereas in L4 no significant difference was detected (Fig. 3a, b). Additional variation was evident at the sublineage level. Within sublineage L2.2 (ancient Beijing), isoniazid resistance emerged significantly earlier than rifampicin resistance (Fig. 3a, b; 2007 [2002–2011] vs. 2005 [1998–2007]; Wilcoxon rank-sum test with Benjamini–Hochberg FDR p = 0.049), while in sublineage L2.3 (modern Beijing), there was no significant difference. These lineage- and sublineage-specific heterogeneities shaped the relationship between the emergence of drug resistance and the introduction of drugs into clinical use: in L2 (Pearson correlation test R = 0.98, p < 0.001) and its sublineages (Fig. 3c), the median MRCA ages of resistant subgroups correlated closely with drug introduction dates, whereas no correlation was evident in L4 (Fig. 3c). Population mobility surpasses spatial distance in driving cross-regional spread of drug-resistant tuberculosis Sampling biases may affect transmission inference11,12. The probability that two isolates from different regions belonged to the same resistant subgroup was strongly correlated with the number of samples (Supplementary Fig. 1). To account for this, we developed a relative risk (RR) metric to quantify transmission risk between regions, describing how the number of sequence pairs from two regions that fall within the same resistant subgroup differs from that expected given the overall number of pairs observed in these regions. The RR metric showed no correlation with the number of sequences in our dataset (Supplementary Fig. 1), demonstrating that the RR effectively eliminates potential bias from sampling heterogeneity. To better resolve the patterns of drug-resistant Mtb spread across China, we estimated the RR of transmission within and between provinces. The RR was highest within the same province but showed no significant difference between adjacent and non-adjacent provinces (Fig. 4a), suggesting that geographic distance alone has limited influence on cross-provincial transmission. To further quantify this effect, we modeled RR as a function of distance and observed that transmission risk declined with increasing distance, but only within a restricted spatial range (Fig. 4b). The spatial range over which RR remained elevated (RR > 1) differed by drug, being largest for isoniazid-resistant subgroups (up to 483 km) and smallest for pyrazinamide-resistant subgroups (225 km).Fig. 4Transmission patterns of drug-resistant Mtb in China.a, Relative risk (RR) that isolate pairs belong to the same resistant subgroup, stratified by provincial adjacency and anti-TB drug. Numbers of province pairs for within-province, adjacent-province and non-adjacent-province comparisons, respectively, are: INH (N = 30, 18, 115), RIF (N = 30, 8, 62), EMB (N = 29, 2, 38), PZA (N = 24, 2, 15), STR (N = 30, 14, 82), FLQ (N = 26, 1, 13). Boxes show the 1st and 3rd quartiles, with the median indicated by a horizontal line; whiskers represent median ± 1.5 × IQR. Statistical significance was assessed by Wilcoxon tests (two-sided) with Benjamini–Hochberg correction for multiple comparisons. b, RR as a function of geographic distance between provincial centroids, stratified by drug. The red dashed line marks the distance threshold beyond which RR no longer decreases with increasing distance. Error bands represent the 95% confidence interval. c, Relationship between the RR of drug-resistant Mtb transmission and the RR of population movement derived from Chinese census data, stratified by drug. The color of each dot represents the spatial relationship between provinces: yellow indicates within-province, purple indicates adjacent provinces, and gray indicates non-adjacent provinces. Error bands represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided). Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), fluoroquinolone (FLQ). Transmission patterns of drug-resistant Mtb in China. a, Relative risk (RR) that isolate pairs belong to the same resistant subgroup, stratified by provincial adjacency and anti-TB drug. Numbers of province pairs for within-province, adjacent-province and non-adjacent-province comparisons, respectively, are: INH (N = 30, 18, 115), RIF (N = 30, 8, 62), EMB (N = 29, 2, 38), PZA (N = 24, 2, 15), STR (N = 30, 14, 82), FLQ (N = 26, 1, 13). Boxes show the 1st and 3rd quartiles, with the median indicated by a horizontal line; whiskers represent median ± 1.5 × IQR. Statistical significance was assessed by Wilcoxon tests (two-sided) with Benjamini–Hochberg correction for multiple comparisons. b, RR as a function of geographic distance between provincial centroids, stratified by drug. The red dashed line marks the distance threshold beyond which RR no longer decreases with increasing distance. Error bands represent the 95% confidence interval. c, Relationship between the RR of drug-resistant Mtb transmission and the RR of population movement derived from Chinese census data, stratified by drug. The color of each dot represents the spatial relationship between provinces: yellow indicates within-province, purple indicates adjacent provinces, and gray indicates non-adjacent provinces. Error bands represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided). Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), fluoroquinolone (FLQ). We next evaluated whether these transmission patterns could be explained by human mobility. Using interprovincial migration data in the Chinese national census (Methods), we estimated RR of population movement between provinces. The RR of drug-resistant Mtb transmission was strongly correlated with human mobility RR (Fig. 4c), underscoring the major role of population movement in shaping cross-provincial spread. Moreover, migration patterns remained remarkably consistent from 2000 to 2020 (Supplementary Fig. 2), suggesting that the transmission of drug-resistant Mtb has been sustained by long-standing and stable patterns of human movement. Bacterial fitness shapes the spatial extent of transmission in drug-resistant Mtb Building on these observations, we found that the spatial extent of elevated transmission risk (RR > 1) varied across drug-resistant Mtb (Fig. 4b). Based on our inference of distinct emergence times for different drug resistances (Fig. 3a), we hypothesized that resistant strains arising earlier had more time to spread across longer transmission distances. To test this hypothesis, we examined the relationship between the MRCA and the spatial distance between isolate pairs within each resistant subgroup. Across all drugs, we observed a significant positive correlation between divergence time and geographic distance (Fig. 5a), indicating that older resistant strains tend to spread across larger spatial distances. Even after adjusting for the effect of emergence time, there remained significant differences in the spatial distributions of the resistant strains (Fig. 5a), suggesting intrinsic heterogeneity in the transmission dynamics of the resistant strains that could not be explained by their emergence time.Fig. 5Impact of bacterial factors on the transmission of drug-resistant Mtb.a, Comparison of transmission distances among drug-resistant subgroups. Significance symbols above each dot indicate P values for the correlation between origin time and transmission distance for each drug. The x-axis represents transmission speed, defined as the slope of this correlation (i.e., transmission distance per unit time). Significance symbols to the right of dots denote P values for between-drug comparisons of transmission speed. Numbers of isolate pairs belonging to the same drug-resistant subgroup are: INH (N = 9314), RIF (N = 6682), EMB (N = 3579), PZA (N = 1601), STR (N = 7225), FLQ (N = 1558). Error bars represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided) for origin time-transmission distance associations, and two-sided Wilcoxon tests with Benjamini–Hochberg correction for between-drug comparisons of transmission speed. b, RR that pairs of rifampicin-resistant isolates belong to the same resistant subgroup, stratified by the presence or absence of compensatory mutations (CMs). Numbers of province pairs for within-province, adjacent-province and non-adjacent-province comparisons, respectively, are: With CMs (N = 24, 4, 28), Without CMs (N = 30, 5, 51). Boxes show the 1st and 3rd quartiles, with the median indicated by a horizontal line; whiskers represent median ± 1.5 × IQR. Statistical significance was assessed by Wilcoxon tests (two-sided). c, RR as a function of geographic distance between provincial centroids for rifampicin-resistant isolates, stratified by CM status. Error bands represent the 95% confidence interval. d, Comparison of transmission distances between rifampicin-resistant strains with and without CMs. Significance symbols and the definition of transmission speed follow those in panel a. Numbers of isolate pairs belonging to the same drug-resistant subgroup are: With CMs (N = 2755), Without CMs (N = 3927). Error bars represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided) for origin time-transmission distance associations, and two-sided Wilcoxon tests for group comparisons of transmission speed. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), fluoroquinolone (FLQ). Impact of bacterial factors on the transmission of drug-resistant Mtb. a, Comparison of transmission distances among drug-resistant subgroups. Significance symbols above each dot indicate P values for the correlation between origin time and transmission distance for each drug. The x-axis represents transmission speed, defined as the slope of this correlation (i.e., transmission distance per unit time). Significance symbols to the right of dots denote P values for between-drug comparisons of transmission speed. Numbers of isolate pairs belonging to the same drug-resistant subgroup are: INH (N = 9314), RIF (N = 6682), EMB (N = 3579), PZA (N = 1601), STR (N = 7225), FLQ (N = 1558). Error bars represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided) for origin time-transmission distance associations, and two-sided Wilcoxon tests with Benjamini–Hochberg correction for between-drug comparisons of transmission speed. b, RR that pairs of rifampicin-resistant isolates belong to the same resistant subgroup, stratified by the presence or absence of compensatory mutations (CMs). Numbers of province pairs for within-province, adjacent-province and non-adjacent-province comparisons, respectively, are: With CMs (N = 24, 4, 28), Without CMs (N = 30, 5, 51). Boxes show the 1st and 3rd quartiles, with the median indicated by a horizontal line; whiskers represent median ± 1.5 × IQR. Statistical significance was assessed by Wilcoxon tests (two-sided). c, RR as a function of geographic distance between provincial centroids for rifampicin-resistant isolates, stratified by CM status. Error bands represent the 95% confidence interval. d, Comparison of transmission distances between rifampicin-resistant strains with and without CMs. Significance symbols and the definition of transmission speed follow those in panel a. Numbers of isolate pairs belonging to the same drug-resistant subgroup are: With CMs (N = 2755), Without CMs (N = 3927). Error bars represent the 95% confidence interval. Statistical significance was assessed by linear regression (two-sided) for origin time-transmission distance associations, and two-sided Wilcoxon tests for group comparisons of transmission speed. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), pyrazinamide (PZA), streptomycin (STR), fluoroquinolone (FLQ). Previous studies have suggested that the relative fitness of drug-resistant Mtb may influence their transmissibility13,14. To determine whether the differences in transmission distances among resistant strains could be attributable to variations in bacterial fitness, we compared the transmission dynamics between resistant strains carrying compensatory mutations (CMs)—which are known to restore the fitness costs associated with resistance mutations15—and those lacking such CMs. We found that CMs had no significant effect on transmission risk over very short distances within a province, or very long distances to non-adjacent provinces, but significantly promoted transmission across adjacent provinces (Fig. 5b). The spatial distribution was greater for strains carrying CMs than for those without CMs (Fig. 5c). After adjusting for the effects of emergence time, the transmission distances of CM carriers remained longer than those of non-carriers (Fig. 5d), indicating that enhanced bacterial fitness facilitates the wider geographical spread of drug-resistant Mtb in China. Genomic signatures of pre- and post-resistance in Mtb To systematically identify bacterial factors that contribute to the emergence and transmission of drug resistance, we used the high-resolution phylogeny of more than 18,000 Chinese Mtb isolates in our dataset to map dependencies between sequentially occurring mutations. This analysis revealed 23 pre-resistance mutations that tended to be acquired before DRMs and preferentially co-occurred with DRMs rather than occurring alone, as well as 28 post-resistance mutations acquired after DRMs that exhibited similar co-occurrence enrichment patterns (Fig. 6a). Drug resistance genes display strong signatures of ongoing positive selection in Mtb populations16. We therefore examined whether genes harboring pre- or post-resistance mutations show comparable signals of positive selection. Analysis of 51,229 globally collected clinical isolates revealed that genes carrying either pre- or post-resistance mutations generally (55.6%, 20/36) had dN/dS ratios greater than one (Fig. 6a and Supplementary Fig. 3), consistent with ongoing positive selection. These results suggest that both classes of loci continue to evolve adaptively under antibiotic pressure.Fig. 6Bacterial genetic factors promoting the emergence and transmission of drug resistance.a, Mutations showing evolutionary dependency with drug resistant mutations, occurring either before (pre-resistance mutations; left, blue circle plot) or after (post-resistance mutations; right, red circle plot) the acquisition of resistance. Bar plots show recent selection signals (dN/dS) for the corresponding genes among > 50,000 global Mtb isolates, red stars indicate genes with dN/dS > 1. In the circle plots, the color and thickness of connecting lines represent the odds ratio (OR), indicating the likelihood that two mutations occur sequentially rather than independently. b, Effect of gene knockdown on Mtb survival under diverse antibiotic stresses for genes harboring pre-resistance mutations, based on genome-wide CRISPR interference (CRISPRi) chemical-genetic screens reported by Li et al18. Square color represents the log2 fold-change (L2FC) value for each gene, with red indicating that gene knockdown enhanced bacterial fitness under drug pressure and blue indicating reduced fitness. All genes shown as squares in the heatmap are significantly enriched or depleted under the corresponding drug pressure. c, Effect of gene knockdown on Mtb survival across three modeled transmission stages for genes harboring post-resistance mutations. Part of the schematic (left, created in BioRender. Chen, Y. (2026) https://BioRender.com/gy6mc8t) and data were adapted from the genome-wide CRISPRi screen reported by Mishra et al17. NOSD (number of significant differences) represents the number of pairwise comparisons showing statistically significant differences between groups. The x-axis indicates the log2 median fold change (L2FC) for each gene. L2FC greater than 1 indicate that gene knockdown enhances bacterial transmission fitness, whereas values less than −1 indicate reduced transmission fitness. Bubble color represents the FDR, with darker shades indicating greater statistical significance, and bubble size corresponds to the NOSD value, with larger bubbles indicating higher reproducibility. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), streptomycin (STR), levofloxacin (LVX), linezolid (LZD), bedaquiline (BDQ), clarithromycin (CLR), vancomycin (VAN). Bacterial genetic factors promoting the emergence and transmission of drug resistance. a, Mutations showing evolutionary dependency with drug resistant mutations, occurring either before (pre-resistance mutations; left, blue circle plot) or after (post-resistance mutations; right, red circle plot) the acquisition of resistance. Bar plots show recent selection signals (dN/dS) for the corresponding genes among > 50,000 global Mtb isolates, red stars indicate genes with dN/dS > 1. In the circle plots, the color and thickness of connecting lines represent the odds ratio (OR), indicating the likelihood that two mutations occur sequentially rather than independently. b, Effect of gene knockdown on Mtb survival under diverse antibiotic stresses for genes harboring pre-resistance mutations, based on genome-wide CRISPR interference (CRISPRi) chemical-genetic screens reported by Li et al18. Square color represents the log2 fold-change (L2FC) value for each gene, with red indicating that gene knockdown enhanced bacterial fitness under drug pressure and blue indicating reduced fitness. All genes shown as squares in the heatmap are significantly enriched or depleted under the corresponding drug pressure. c, Effect of gene knockdown on Mtb survival across three modeled transmission stages for genes harboring post-resistance mutations. Part of the schematic (left, created in BioRender. Chen, Y. (2026) https://BioRender.com/gy6mc8t) and data were adapted from the genome-wide CRISPRi screen reported by Mishra et al17. NOSD (number of significant differences) represents the number of pairwise comparisons showing statistically significant differences between groups. The x-axis indicates the log2 median fold change (L2FC) for each gene. L2FC greater than 1 indicate that gene knockdown enhances bacterial transmission fitness, whereas values less than −1 indicate reduced transmission fitness. Bubble color represents the FDR, with darker shades indicating greater statistical significance, and bubble size corresponds to the NOSD value, with larger bubbles indicating higher reproducibility. Abbreviations: isoniazid (INH), rifampicin (RIF), ethambutol (EMB), streptomycin (STR), levofloxacin (LVX), linezolid (LZD), bedaquiline (BDQ), clarithromycin (CLR), vancomycin (VAN). To further elucidate why these mutations might promote the emergence and transmission of drug resistance, we analyzed multiple published Mtb CRISPRi chemical-genetics datasets17,18. For this analysis, we defined pre-resistance genes and post-resistance genes as genes harboring pre- or post-resistance mutations, respectively. Knockdown of pre-resistance genes significantly reduced bacterial survival under diverse anti-TB drug stresses (Fig. 6b), supporting their potential role in facilitating resistance acquisition. In contrast, knockdown of post-resistance genes mainly impaired bacterial survival only during the first stage of an in vitro three-stage transmission model (Fig. 6c), which simulates a hypoxic, necrotic cavity closed off from the airways17. The post-resistance gene rpoC was a notable exception, as its knockdown reduced bacterial fitness across all three stages of the transmission model (Fig. 6c). Discussion This study assembled the largest whole-genome sequencing (WGS) dataset of Mycobacterium tuberculosis (Mtb) isolates from China—comprising over 18,000 genomes—enabling fine-scale reconstruction of the emergence and spread of drug-resistant Mtb. Our analyses revealed that drug resistance in China has been acquired repeatedly and independently, giving rise to numerous small resistant subgroups. The acquisition of resistance followed a consistent trajectory, with isoniazid resistance emerging first, and the subsequent emergence of resistance to other drugs closely paralleling the clinical introduction of each drug into tuberculosis treatment. Transmission risk was highest within provinces, with spatial distance exerting only a limited influence on cross-regional spread. Instead, it appeared that human mobility and bacterial fitness were the key determinants driving long-distance transmission. From an evolutionary perspective, we identified novel mutations associated with the emergence and spread of drug resistance, and showed that these novel mutations occurred in genes shown to be involved with antibiotic stress adaptation and transmission survival. This revealed that bacterial genetic factors can influence both the emergence and transmission of drug resistance in Mtb. The temporal sequence of resistance emergence showed both shared and lineage-specific patterns. Across lineages, isoniazid resistance consistently represented the first step toward multidrug resistance (Fig. 3b, c), a pattern consistent with previous studies19–21, likely due to its early clinical introduction22, higher spontaneous mutation rate23, and capacity to promote adaptation to subsequent antibiotic pressures24. Lineage-specific differences were notable for streptomycin resistance, which emerged in L2 almost simultaneously with isoniazid resistance and earlier than resistance to other drugs (Fig. 3b, c), but arose later in L4, coinciding with fluoroquinolone resistance, which may explain the lack of correlation between resistance emergence and drug introduction in this lineage (Fig. 3c). Further analysis showed that the sampling times of streptomycin-resistant L4 isolates did not differ significantly from those of L2 (Supplementary Fig. 4), indicating that the pattern was not due to limited earlier L4 sampling. Notably, 60.3% (73/121) of L4 streptomycin-resistant strains were collected from Zhejiang, Guangdong, and Shanghai—relatively low TB burden regions—suggesting that inadequate local control is unlikely to account for this pattern. These findings suggest that other, as yet unidentified, biological or epidemiological factors may underlie the recent rise in streptomycin resistance among L4 strains in China. Most traceable resistance events appear to have emerged after 2000. There are two possible explanations for this pattern: (1) an historical increase in the number of resistant strains occurring after 2000, or (2) the gradual loss of earlier resistant strains over time. The first explanation appears unlikely, as our dataset provided no evidence of a sharp increase in resistant isolates after 2000 (Fig. 1b). It also seems unlikely because the introduction, since 2000, of standardized treatment guidelines for drug-resistant TB by the WHO and China has substantially improved TB control25,26, and Bayesian skyline analyses by Huang et al. indicated a decline in the number of MDR-TB strains in China during the same period27. We therefore hypothesize that the observed pattern primarily reflects the gradual decay of older resistance over the 20-year timeframe. To test this, we assessed how the number of isolate pairs belonging to the same resistant subgroup varied with increasing sampling time differences (Supplementary Fig. 5). The results showed a pronounced decline: as the time interval between isolates increased, the likelihood of detecting pairs from the same resistant subgroup sharply decreased, with almost none persisting beyond 20 years. Although the transmission of old resistant strains becomes rarer over time, the persistent transmission of drug-resistant strains over a two-decade window remains a significant public health concern. Our findings indicate that the spread of drug-resistant TB in China occurs across two distinct spatial scales—local and long-distance—each governed by different drivers. At the local scale, geographic proximity (Fig. 4a, b), fosters spatial clustering and localized transmission hotspots. There is growing recognition that targeting hotspots and high-incidence areas with spatially focused interventions may be an effective strategy for TB control programs28,29. In contrast, long-distance transmission is primarily shaped by human mobility, with spatial distance exerting minimal effects (Fig. 4b, c). Because population movement dynamics are often spatially incoherent and do not align with geographic proximity30, effective control of the long distance spread of resistant strains requires alternative approaches. Integrating empirical data on population mobility can substantially improve epidemic forecasting and enable more targeted, mobility-informed interventions11,31. Our previous global analysis showed that the influence of bacterial genetic determinants on MDR-TB transmission becomes more evident in high-burden settings, but is less important in low-burden or developed countries32. Consistent with this, our nationwide analysis revealed that, in high-burden China, compensatory mutations (CMs) markedly enhance the transmission of resistant strains (Fig. 5b, c, d). While our earlier study in Shanghai, a relatively low-burden region, found no such effect33, our analysis of the nationwide dataset shows that strains carrying CMs exhibit faster transmission, as reflected by greater geographic spread per unit time. We identified 23 mutations that arose before the acquisition of DRMs (pre-resistance mutations) and 28 that arose after resistance acquisition (post-resistance mutations) (Fig. 6a). Comparison with the global dataset of Green et al34. showed an overlap of 13 of 23 pre-resistance and 6 of 28 post-resistance mutations, most of the latter being rpoC variants (83.3%, 5/6). The many mutations that did not overlap suggest that Chinese Mtb populations may have followed distinctive adaptive trajectories facilitating both the emergence and spread of resistance. Pre-resistance mutations may promote resistance development by enhancing bacterial survival under antibiotic stress or increasing mutation rates. Consistent with this, knockdown of genes harboring pre-resistance mutations altered bacterial survival under drug exposure (Fig. 6b), and one evolutionarily dependent mutation, dnaQ R267P, was in a gene associated with hypermutability35. In contrast, the mechanisms by which post-resistance mutations enhance transmission remain less clear. Knockdown of 16 genes carrying post-resistance mutations reduced survival in an in vitro transmission model for a subset of these genes (25%, 4/16) (Fig. 6c), notably including rpoC, the site of many compensatory mutations15,32. However, most post-resistance mutations remain functionally uncharacterized, highlighting the need for experimental models capable of defining the determinants of Mtb transmissibility. Our study has several limitations. First, the CRISPRi datasets used in this study were derived from previously published in vitro or model-based systems and therefore cannot fully recapitulate the complexity of in vivo infection and transmission; consequently, the proposed facilitating role of pre-resistance mutations is supported by statistical dependency analyses but remains correlative and requires direct experimental validation. Second, although resistant subgroups were defined using a resistance-centered phylogenetic framework to minimize arbitrary SNP thresholds, we cannot completely exclude the possibility that some clustered isolates represent independent resistance events due to convergent evolution rather than transmission. Third, molecular dating relied on a conservative substitution rate, despite known rate variation across lineages and environments, which may bias origin times toward earlier estimates; application of faster rates would likely shift inferred dates more recently without altering the overall conclusion that most resistant subgroups emerged within the past two decades. Fourth, resistance inference was based on gDST; while predictive performance is high for most first-line drugs and fluoroquinolones, reduced accuracy for pyrazinamide may lead to underestimation of PZA-resistant subgroups. Finally, our analyses were conducted within the lineage structure of China, which is dominated by Lineage 2; differences in historical population structure across regions may influence contemporary resistance dynamics, and comparative studies in settings with contrasting lineage compositions will be important to further clarify this relationship. In addition, the lack of publicly available high-resolution mobility data (e.g., transport network information) limits more refined transmission modeling. In conclusion, we demonstrate that China’s drug-resistant TB epidemics comprise both recently acquired resistance and long-standing resistance maintained through ongoing transmission of specific Mtb subgroups. We also show that the emergence and spread of drug-resistant Mtb is promoted by the combined influences of social, environmental, and bacterial factors. Our ability to reconstruct the origins and expansion dynamics of drug resistance suggests that a nationwide genomic surveillance platform would have the potential for real-time monitoring and improved control of drug-resistant TB in China. Methods Data collection preprocessing WGS data collection To compile whole-genome sequencing (WGS) data of Mtb isolates from China, we searched the NCBI Sequence Read Archive (SRA; https://www.ncbi.nlm.nih.gov/sra), the China National Genomics Data Center (NGDC; https://ngdc.cncb.ac.cn/gsa/), and the China National Microbiology Data Center (NMDC; https://nmdc.cn/) for entries released before December 1, 2023. Geographic origin and collection year for each isolate were extracted from the associated metadata, and study authors were contacted when necessary to obtain missing information. In total, sequencing data for 18,118 isolates were downloaded, of which 17,991 had available geographic and temporal metadata (Supplementary Data 2). Mobility data Population mobility data were obtained from the 5th (2000), 6th (2010), and 7th (2020) National Population Censuses published by the National Bureau of Statistics of China (https://www.stats.gov.cn/sj/pcsj/). The dataset provides province-level inflows and outflows, including the direction of movement between provinces. For each census, the number of interprovincial flows was used to calculate the relative risk (RR) of mobility between pairs of regions (see below), and the final RR was obtained by averaging the RR estimates across the three censuses. Analysis of WGS data We employed a previously established pipeline to identify single nucleotide polymorphisms (SNPs)36. WGS reads were first trimmed with Sickle to retain sequences with Phred quality scores > 20 and lengths > 30 nucleotides37. Reads were then aligned to the Mtb H37Rv reference genome (GenBank accession AL123456) using Bowtie2 (v2.2.9)38. SNPs were called with SAMtools (v1.3.1) under a minimum mapping quality of 3039. Fixed SNPs, with allele frequencies ≥ 75% and supported by at least five reads, were identified by VarScan (v2.3.9)40 using a strand bias filter. SNPs in repetitive or low-complexity regions, PPE/PE-PGRS family genes, phage sequences, and mobile genetic elements, were excluded41. Lineages were assigned on the basis of lineage-specific SNPs42. Population structure and genetic diversity Population structure was assessed by principal component analysis (PCA) of SNP alignments using the R package adegenet (v2.1.11)43. Population differentiation was quantified as pairwise fixation indices (FST) with Arlequin (v3.5.2.2)44. Geospatial genetic structure was evaluated with a Mantel test (10,000 permutations) based on pairwise FST and geographic distances between provinces. Delineation and dating of drug-resistant subgroups Drug susceptibility prediction Genotypic resistance was predicted by comparing our SNP dataset with the WHO catalogue of drug-resistant mutations (DRMs) in the Mtb complex (2nd edition)45. For each antibiotic, isolates were classified as resistant or susceptible based on the presence or absence of Groups 1 and 2 variants listed in the catalogue. Phylogenetic reconstruction For phylogenetic reconstruction, SNPs from all Mtb isolates were merged into a single non-redundant alignment, excluding sites with gaps in > 5% of taxa. Phylogenies were inferred using the maximum likelihood method under the general time reversible (GTR) model with 1000 bootstrap replicates to assess node support. Trees were generated with IQ-TREE (v2.3.6)46 and visualized in iTOL (https://itol.embl.de/)47. Definition and pruning of resistant subgroups For each DRM, phylogenetically adjacent isolates carrying the same mutation were clustered stepwise until a non-carrier was reached, producing subgroups defined by both shared DRMs and phylogenetic proximity. To minimize spurious clustering caused by sampling gaps, whereby unrelated isolates carrying the same mutation may appear adjacent on the tree, we analyzed the distribution of pairwise genetic distances within each subgroup. A Gaussian distribution was fitted to these distances, and the 95% inclusion threshold was applied to identify and exclude isolates whose genetic distances exceeded this range. Estimating resistance acquisition dates of subgroups The maximum likelihood tree was dated using BEAST (v1.8.0)48 under an uncorrelated lognormal relaxed clock with a mean substitution rate of 4.6 × 10−8 per site per year2. We estimated the most recent common ancestor (MRCA) of all resistant isolates within each subgroup, and the timing of resistance acquisition was defined as the estimated age of MRCA. RR framework Quantifying relative risk of Mtb transmission from genetic data To quantify Mtb transmissibility, we calculated the RR that sequences belonging to the same resistant subgroup were isolated from specified regions, as adapted from previous studies11. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n$$\end{document}n denote the total number of sequences analyzed. For a pair of sequences \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i$$\end{document}i and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$j$$\end{document}j, let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${S}_{i}$$\end{document}Si and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${S}_{j}$$\end{document}Sj denote their resistant subgroups, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R}_{i}$$\end{document}Ri and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${R}_{j}$$\end{document}Rj the regions of isolation. We then define \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${n}_{A,B}^{S}$$\end{document}nA,BS as the number of sequence pairs that share the same resistant subgroup, where sequence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$i$$\end{document}i was isolated from region A and sequence \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$j$$\end{document}j from region B.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${n}_{A,B}^{\mathrm{S}}={\sum }_{i=1}^{n}{\sum }_{j=1}^{n}{1}_{\{i\ne j\}\,}\,{1}_{\{{S}_{i}={S}_{j}\}}\,{1}_{\{{R}_{i}=A\}\,}\,{1}_{\{{R}_{j}=B\}\,}$$\end{document}nA,BS=∑i=1n∑j=1n1{i≠j}1{Si=Sj}1{Ri=A}1{Rj=B} Similarly, we define the marginal quantities \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${n}_{A}^{S}$$\end{document}nAS, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${n}_{B}^{S}$$\end{document}nBS, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${n}^{S}$$\end{document}nS to denote the number of such pairs in which only one region (A or B) or neither is specified.2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${n}_{A}^{\mathrm{S}}={\sum }_{i=1}^{n}{\sum }_{j=1}^{n}{1}_{\{i\ne j\}}\,{1}_{\{{S}_{i}={S}_{j}\}}\,{1}_{\{{R}_{i}=A\}},\,{n}^{\mathrm{S}}={\sum }_{i=1}^{n}{\sum }_{j=1}^{n}{1}_{\{i\ne j\}}\,{1}_{\{{S}_{i}={S}_{j}\}}$$\end{document}nAS=∑i=1n∑j=1n1{i≠j}1{Si=Sj}1{Ri=A},nS=∑i=1n∑j=1n1{i≠j}1{Si=Sj} We derived the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R{R}_{A,B}^{S}$$\end{document}RRA,BS to measure the extent to which sequences belonging to the same resistant subgroup were observed in regions A and B, relative to what would be expected based on the overall sequencing distribution across regions, as:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R{R}_{A,B}^{\mathrm{S}}=\frac{{n}_{A,B}^{\mathrm{S}}/{n}_{A}^{\mathrm{S}}}{{n}_{B}^{\mathrm{S}}/{n}^{\mathrm{S}}}=\frac{{n}_{A,B}^{\mathrm{S}}\cdot {n}^{\mathrm{S}}}{{n}_{A}^{\mathrm{S}}\cdot {n}_{B}^{\mathrm{S}}}$$\end{document}RRA,BS=nA,BS/nASnBS/nS=nA,BS⋅nSnAS⋅nBS The numerator corresponds to the proportion of sequences isolated from region A that form same-subgroup pairs with sequences isolated from region B. The denominator serves as a normalization factor, capturing the overall contribution of region B to the total number of same-subgroup pairs. Thus, the ratio quantifies the extent to which pairs linking regions A and B are enriched relative to what would be expected given the overall distribution of sequences across regions. Quantifying relative risk of population movement from mobility data To quantify population movement from mobility data, we calculated the RR of movement between pairs of regions. Data from the Chinese population census provide directed flows between provinces. We define \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{A\to B}$$\end{document}MA→B as the number of individuals moving from region A to region B. The total bidirectional population flow between regions A and B is then given by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{A,B}={M}_{A\to B}+{M}_{B\to A}$$\end{document}MA,B=MA→B+MB→A. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R$$\end{document}R denote the set of regions from which the strains in this study were isolated. Similarly, we define the marginal quantities \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{A}$$\end{document}MA, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{B}$$\end{document}MB, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$M$$\end{document}M to denote the number of bidirectional flows in which only one region (A or B) or neither is specified.4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${M}_{A}={\sum }_{Y{\mathscr{\in }}{\mathscr{R}}}{M}_{A,Y},\,{M}_{B}={\sum }_{X{\mathscr{\in }}{\mathscr{R}}}{M}_{X,B},\,M={\sum }_{X{\mathscr{\in }}{\mathscr{R}}}{\sum }_{Y{\mathscr{\in }}{\mathscr{R}}}{M}_{X,Y}$$\end{document}MA=∑Y\inRMA,Y,MB=∑X\inRMX,B,M=∑X\inR∑Y\inRMX,Y We derived the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R{R}_{A,B}^{M}$$\end{document}RRA,BM to characterize the level of population movement between regions A and B, as:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R{R}_{A,B}^{\mathrm{M}}=\frac{{M}_{A,B}\cdot M}{{M}_{A}\cdot {M}_{B}}$$\end{document}RRA,BM=MA,B⋅MMA⋅MB Transmission speed and compensatory evolution For each resistant subgroup, we evaluated all isolate pairs. The divergence time of their MRCA was estimated alongside the geographic distance between sampling locations. Transmission speed was defined as the slope of the regression between divergence time and geographic distance. An in-house Python script was written to detect the putative compensatory mutations (CMs; Supplementary Data 3) that had been systematically identified in our previous work and other large-scale studies32. Identification and functional characterization of genomic signatures of pre- and post-resistance in Mtb Analysis of genome-wide mutational dependence We investigated evolutionary dependency between sequentially occurring mutation pairs using a previously published framework34. In this approach, the temporal order of mutations is inferred from phylogenetic reconstruction, with mutations on ancestral branches considered earlier than those on descendant branches. Evolutionary dependency is defined when the probability of one mutation differs significantly in genomes with versus without a preceding mutation. Applying this method, we systematically screened combinations of drug-resistance and non-resistance mutations, and classified pairs of sequentially occurring dependent mutations as either pre-resistance (non-resistance mutations arising before resistance acquisition) or post-resistance (emerging after resistance acquisition). Ongoing positive selection in genes carrying pre- and post-resistance mutations Signals of ongoing positive selection in the Mtb population were assessed using WGS data from ~50,000 clinical isolates compiled and published by Liu et al16. We specifically analyzed genes carrying pre- and post-resistance mutations to evaluate their recent selection dynamics. CRISPR interference chemical-genetics platform for antibiotic survival To learn about the genes carrying pre-resistance mutations, we consulted the CRISPRi chemical-genetics database established by Li et al18, which systematically profiled the effects of gene knockdown on Mtb survival under multiple antibiotic pressures. Specifically, we assessed whether a gene’s knockdown significantly impacted bacterial survival under antibiotic stress. Significance was defined as a fold change greater than 1.5 with a false discovery rate (FDR) below 0.05. CRISPR interference chemical-genetics platform for transmission survival We also drew on the three-stage transmission model of Mtb established by Mishra et al17, in which genome-wide CRISPRi screens quantified the contribution of individual genes to bacterial survival during transmission. Based on these data, we analyzed genes carrying post-resistance mutations and evaluated whether their knockdown significantly affected survival across different transmission stages. Significance was defined as a fold change greater than 1.5 with an FDR below 0.05. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Supplementary information Supplementary Information Description of Additional Supplementary Files Supplementary Data 1 Supplementary Data 2 Supplementary Data 3 Reporting Summary Transparent Peer Review file Supplementary Information Description of Additional Supplementary Files Supplementary Data 1 Supplementary Data 2 Supplementary Data 3 Reporting Summary Transparent Peer Review file