We conducted a case-control study to evaluate the effect of Helicobacter pylori (HP) infection on the risk of gastric cancer in Tokyo, Japan. The sera at the time of diagnosis from 282 gastric cancer cases and 767 sex- and age-matched cancer-free controls were tested for the presence of anti-HP IgG antibody (HM-CAP ELISA kit) and serum pepsinogen (PG) level (PG I and PG II Riabead). No significant association was observed in all sets [matched odds ratio (OR) = 1.04, 95% confidence interval: 0.73-1.49]. In subgroup analyses, however, an association was suggested in females [OR = 1.57], a younger population (< 50 years) [OR = 1.86], early cancer [OR = 1.53] and small cancer (< 40 mm) [OR = 1.55]. Furthermore, we observed a tendency for odds ratios to decrease with an increase in age or cancer growth (depth of tumor invasion and tumor size). Considering that the spontaneous disappearance of HP due to extended mucosal atrophy may lead to these decreasing odds ratios, we applied the conditional logistic model adjusted for the PG I/II ratio as a measure of atrophic gastritis. This analysis showed a positive association with HP infection in all sets [OR = 1.69; 1.01-2.81], distal cancer [OR = 1.88; 1.07-3.31] and intestinal-type cancer [OR = 3.76; 1.39-10.18]. We concluded that the risk of cancer associated with HP infection may be underestimated in studies with cross-sectional exposure because of spontaneous disappearance of HP due to extended mucosal atrophy.