This study aims to estimate the prevalence of Helicobacter pylori in Glasgow, and to provide a systematic analysis of factors associated with this prevalence. The data used are from a random population sample of 793 men and 838 women aged 25-64 years conducted in 1995. The prevalence is estimated to be 66% (95% confidence interval: 63-68%); a level that is more typical of developing countries. Prevalence increases with age and social deprivation (P<0.0001) and is slightly higher in men than women (P = 0.07). After adjustment for age, social class, and sex group, H. pylori prevalence increases with increased cotinine (tobacco consumption) (P = 0.0005), increased number of siblings (P<0.0001), and decreased height (P = 0.03). Prevalence of coronary heart disease, hypertension, diabetes and intermittent claudication, alcohol consumption, fibrinogen, total serum cholesterol, HDL cholesterol, triglycerides, marital status, systolic and diastolic blood pressure had no independent association. The infection seems to be spread more readily in deprived, relatively crowded living conditions in childhood. The independent relationship with smoking suggests a possible second source of spread of infection in later years. The high degree of social deprivation in Glasgow is suggested as a major explanation of the high H. pylori prevalence found there.