OBJECTIVES Many children with HIV infection now survive into adulthood. This study explored the impact of vertically acquired HIV in the era of antiretroviral therapy on the development of humoral immunity. DESIGN Natural and vaccine-related immunity to pneumococcus and B-cell phenotype was characterized and compared in three groups of young adults: those with vertically-acquired infection, those with horizontally acquired infection and healthy controls. METHODS Serotype-specific pneumococcal (Pnc) immunoglobulin M and G concentrations before and up to 1 year post-Pnc polysaccharide (Pneumovax) immunization were determined, and opsonophagocytic activity was analysed. B-cell subpopulations and dynamic markers of B-cell signalling, turnover and susceptibility to apoptosis were evaluated by flow cytometry. RESULTS HIV-infected patients showed impaired natural Pnc immunity and reduced humoral responses to immunization with Pneumovax; this was greatest in those viraemic at time of the study. Early-life viral control before the age of 10 years diminished these changes. Expanded populations of abnormally activated and immature B-cells were seen in both HIV-infected cohorts. Vertically infected patients were particularly vulnerable to reductions in marginal zone and switched memory populations. These aberrations were reduced in patients with early-life viral control. CONCLUSION In children with HIV, damage to B-cell memory populations and impaired natural and vaccine immunity to pneumococcus is evident in early adult life. Sustained viral control from early childhood may help to limit this effect and optimize humoral immunity in adult life.