Infection with Helicobacter pylori increases an individual's risk of peptic ulceration and gastric cancer. In the developed world, prevalence of infection rises with age and varies with social class. We used a cross-sectional study design to test the hypothesis that H pylori infection would be more closely associated with childhood living conditions than with current socioeconomic status. Prevalence of IgG antibodies against H pylori was determined with an enzyme-linked immunosorbent assay in 215 subjects (median age 46 years, range 18-82) attending a health-screening clinic in London. Seropositivity varied from 9% (age less than 30) to 67% (greater than or equal to 70). Subjects were asked about their living conditions at present and when they were aged 8 years. Absence of a fixed hot-water supply (p = 0.0005) and domestic crowding (p = 0.0005) in childhood were powerful independent risk factors for current infection with H pylori. Among current living conditions, only the number of children living in the household was independently associated with H pylori infection (p = 0.004). Most British adults infected with H pylori probably became infected by household contact in childhood.