BACKGROUND AND AIMS: It is not known why some people with Helicobacter pylori infection develop gastric cancer whereas others do not. Whether the CagA phenotype of H pylori infection affected risk for cancer independently of other posited risk factors was evaluated. SUBJECTS: 242 persons who participated in a previous nested case-control study of gastric cancer. 179 (90 cases and 89 controls) were infected with H pylori as determined by enzyme linked immunosorbent assay (ELISA) in serum and 63 (13 cases and 50 controls) were uninfected. METHODS: Serum samples from cases and controls, obtained a mean of 14.2 years before diagnosis of cancer in the cases, were tested by ELISA for IgG antibodies against the CagA gene product of H pylori. They had previously been tested for pepsinogen I. Using logistic regression analysis, risk for cancer was compared among infected persons with CagA antibodies, infected persons without CagA antibodies, and uninfected persons. RESULTS: Subjects infected with H pylori who had CagA antibodies were 5.8-fold more likely than uninfected subjects to develop gastric cancer (95% confidence interval (95% CI) = 2.6-13.0). This was true for both intestinal (odds ratio (OR) 5.1, 95% CI = 2.1-12.2) and diffuse type (OR 10.1, 95% CI = 2.2-47.4) cancers. By contrast, H pylori infected subjects without CagA antibodies were only slightly, and not significantly, at increased risk for cancer (OR 2.2, 95% CI = 0.9-5.4) and any possible association was restricted to diffuse type carcinoma (OR 9.0, 95% CI = 1.2-65.8). Pepsinogen 1 < 50 ng/ml significantly increased risk for both cancer types in H pylori infected persons and lessened the magnitude of association between CagA and cancer. Educational attainment, cigarette smoking, and ABO blood group were not associated with malignancy. CONCLUSIONS: When compared with uninfected subjects, persons infected with CagA positive H pylori are at considerably increased risk of gastric cancer. CagA negative H pylori are less strongly linked to malignancy and may only be associated with diffuse type disease.