Background: Pneumonia is a leading cause of mortality and morbidity in children globally. The cause of pneumonia after introduction of the 13-valent pneumococcal conjugate vaccine (PCV13) has not been well studied in low-income and middle-income countries, and most data are from cross-sectional studies of children admitted to hospital. We aimed to longitudinally investigate the incidence and causes of childhood pneumonia in a South African birth cohort. Methods: We did a nested case-control study of children in the Drakenstein Child Health Study who developed pneumonia from May 29, 2012, to Dec 1, 2014. Children received immunisations including acellular pertussis vaccine and PCV13. A nested subgroup had nasopharyngeal swabs collected every 2 weeks throughout infancy. We identified pneumonia episodes and collected blood, nasopharyngeal swabs, and induced sputum specimens. We used multiplex real-time PCR to detect pathogens in nasopharyngeal swabs and induced sputum of pneumonia cases and in nasopharyngeal swabs of age-matched and site-matched controls. To show associations between organisms and pneumonia we used conditional logistic regression; results are presented as odds ratios (ORs) with 95% CIs. Findings: 314 pneumonia cases occurred (incidence of 0·27 episodes per child-year, 95% CI 0·24-0·31; median age 5 months [IQR 3-9]) in 967 children during 1145 child-years of follow-up. 60 (21%) cases of pneumonia were severe (incidence 0·05 episodes per child-year [95% CI 0·04-0·07]) with a case fatality ratio of 1% (three deaths). A median of five organisms (IQR 4-6) were detected in cases and controls with nasopharyngeal swabs, and a median of six organisms (4-7) recorded in induced sputum (p=0·48 compared with nasopharyngeal swabs). Bordetella pertussis (OR 11·08, 95% CI 1·33-92·54), respiratory syncytial virus (8·05, 4·21-15·38), or influenza virus (4·13, 2·06-8·26) were most strongly associated with pneumonia; bocavirus, adenovirus, parainfluenza virus, Haemophilus influenzae, and cytomegalovirus were also associated with pneumonia. In cases, testing of induced sputum in addition to nasopharyngeal swabs provided incremental yield for detection of B pertussis and several viruses. Interpretation: Pneumonia remains common in this highly vaccinated population. Respiratory syncytial virus was the most frequently detected pathogen associated with pneumonia; influenza virus and B pertussis were also strongly associated with pneumonia. Testing of induced sputum increases the yield for detection of several organisms. New vaccines and strategies are needed to address the burden of childhood pneumonia. Funding: Bill & Melinda Gates Foundation, Medical Research Council South Africa, National Research Foundation South Africa, National Institute of Health, and H3Africa.