It has been suggested that the risk of stomach cancer is increased when there is a history of gastric ulcer, but decreased in those with a history of duodenal ulcer. To provide further information on the issue, data from a case-control study of gastric cancer conducted in greater Milan, northern Italy, between 1985 and 1993, were examined. There were 746 cases of gastric cancer below the age of 75 and 2,053 controls admitted to hospital for acute, non-neoplastic, non-hormone-related diseases. A total of 76 (10.2%) cases and 84 (4.1%) controls reported a history of gastric ulcer, corresponding to a multivariate odds ratio (OR) of 2.6 (95% confidence interval, CI = 1.8-3.6). Fifty nine cases (7.9%) and 111 (5.4%) controls reported a history of duodenal ulcer, corresponding to an OR of 1.3 (95% CI = 0.9-1.8). The OR of gastric cancer was significantly above unity for the first five years after diagnosis of gastric ulcer (OR = 7.4, 95% CI 3.7-14.8), and declined thereafter. No consistent pattern of risks was observed after duodenal ulcer. The present data therefore confirm that the risk of gastric cancer is increased after gastric ulcer. They do not support, however, a reduced risk after duodenal ulcer. This may be due to variable baseline characteristics of the populations studied, or to the different role and impact of Helicobacter pylori and other determinants of duodenal ulcer and gastric cancer in various countries.