Background: The South African tuberculosis epidemic is largely driven by HIV. Interventions including directly observed therapy (DOTS), antiretroviral therapy (ART), isoniazid preventative therapy (IPT), increased tuberculosis screening, and Xpert MTB/RIF have been implemented to control the tuberculosis burden. This study aimed to estimate the impact of HIV and interventions on the South African tuberculosis epidemic between 1990 and 2019. Methods: A dynamic tuberculosis transmission model for South Africa was developed. A Bayesian approach was used to calibrate the model to the numbers of people starting treatment, tuberculosis deaths, microbiological tests, and a national tuberculosis prevalence survey. Counterfactual scenarios were simulated to estimate tuberculosis incidence and mortality attributable to HIV, and the impact of interventions on tuberculosis incidence. Findings: Between 1990 and 2019, 8·8 million (95% confidence interval (CI) 8·3–9·3 million) people developed tuberculosis, and 2·1 million (95% CI 2·0–2·2 million) died from tuberculosis. 55% and 69% of the tuberculosis incidence and mortality respectively were due to HIV. Overall, tuberculosis screening and ART had a substantial impact, reducing tuberculosis incidence by 28·2% (95% CI 26·4–29·8%) and 20·0% (95% CI 19·2–20·7%) respectively, in 2019; IPT, DOTS and Xpert MTB/RIF had minor impacts. Interpretation: HIV has heightened tuberculosis incidence and mortality. The provision of ART and intensification of tuberculosis screening explain most declines in tuberculosis incidence between 2005 and 2019. Continued efforts are therefore required to strengthen these interventions. There is a need for improved diagnostics and preventative therapy to accelerate progress towards ending the tuberculosis epidemic. Funding: National Institutes of Health, South African National Research Foundation, and Bill and Melinda Gates Foundation Declaration of Interest: We declare no competing interests.