Background: Knowledge of the age-specific prevalence of immunity from, and incidence of infection with, 2009 pandemic influenza A H1N1 virus is essential for modelling the future burden of disease and the effectiveness of interventions such as vaccination. Methods: In this cross-sectional serological survey, we obtained 1403 serum samples taken in 2008 (before the first wave of H1N1 infection) and 1954 serum samples taken in August and September, 2009 (after the first wave of infection) as part of the annual collection for the Health Protection Agency seroepidemiology programme from patients accessing health care in England. Antibody titres were measured by use of haemagglutination inhibition and microneutralisation assays. We calculated the proportion of samples with antibodies to pandemic H1N1 virus in 2008 by age group and compared the proportion of samples with haemagglutination inhibition titre 1:32 or more (deemed a protective response) before the first wave of infection with the proportion after the first wave. Findings: In the baseline serum samples from 2008, haemagglutination inhibition and microneutralisation antibody titres increased significantly with age (F test p<0·0001). The proportion of samples with haemagglutination inhibition titre 1:32 or more ranged from 1·8% (three of 171; 95% CI 0·6-5·0) in children aged 0-4 years to 31·3% (52 of 166; 24·8-38·7) in adults aged 80 years or older. In London and the West Midlands, the difference in the proportion of samples with haemagglutination inhibition titre equal to or above 1:32 between baseline and September, 2009, was 21·3% (95% CI 8·8-40·3) for children younger than 5 years of age, 42·0% (26·3-58·2) for 5-14-year-olds, and 20·6% (1·6-42·4) for 15-24-year-olds, with no difference between baseline and September in older age groups. In other regions, only children younger than 15 years showed a significant increase from baseline (6·3%, 1·8-12·9). Interpretation: Around one child in every three was infected with 2009 pandemic H1N1 in the first wave of infection in regions with a high incidence, ten times more than estimated from clinical surveillance. Pre-existing antibody in older age groups protects against infection. Children have an important role in transmission of influenza and would be a key target group for vaccination both for their protection and for the protection of others through herd immunity. Funding: National Institute for Health Research Health Technology Assessment Programme.