In South Africa, 7-valent pneumococcal conjugate vaccine (PCV7) was introduced in 2009 and 13-valent PCV (PCV13) was introduced in 2011, both in a two plus one schedule. We evaluated the ongoing effects of PCV on the prevention of invasive pneumococcal disease (IPD) over 15 years of sustained surveillance in South Africa before the COVID-19 pandemic. We conducted national, active, laboratory-based surveillance for IPD among all ages in South Africa, including isolate serotyping and susceptibility testing. We fitted linear regression models with vaccine covariates to imputed IPD case counts each year by serotype and age to compare expected and actual IPD cases in 2019, which was the main outcome. Vaccine effects were set to zero to identify expected incidence after the introduction of PCV7 and PCV13. From Jan 1, 2005, to Dec 31, 2019, surveillance identified 52 957 IPD cases. Among the 50 705 individuals with age data available, 9398 (18·5%) were infants aged younger than 2 years. Compared with expected case numbers (no vaccination) predicted using all available data, overall IPD rates among children younger than 2 years declined by 76·0% (percentage risk difference; 95% CI -79·0 to -72·8%) in 2019; notably, PCV7 and additional PCV13 serotype IPD rates declined by 95·5% (-97·0 to -93·4%) and 93·8% (-96·2 to-90·5%), respectively, whereas non-vaccine serotypes (NVTs) did not change significantly. Among adults aged 25-44 years, overall IPD declined by 50·4% (-54·2 to -46·3%), and PCV7 and additional PCV13 serotype IPD rates declined by 86·1% (-88·7 to -83·1%) and 77·2% (-80·9 to -73·0%), respectively, whereas NVTs increased by 78·5% (56·8 to 103·4%). Individuals aged older than 64 years also benefited from declines in IPD (-30·2%; -41·9 to -16·2%), but NVTs increased (234·9%; 138·1 to 379·4%). We documented sustained direct and indirect benefits of PCV across age groups, and NVT increases in adults older than 24 years. Higher valency PCVs would have the added benefit of preventing this residual disease. National Institute for Communicable Diseases of the National Health Laboratory Service (South Africa) and US Agency for International Development Antimicrobial Resistance Initiative, US Centers for Disease Control and Prevention.