The long-term effects of cimetidine on the occurrence of gastric and oesophageal cancer were assessed in a prospective cohort study of 9928 patients who had been prescribed cimetidine. They were first identified between 1978 and 1980, and cancer registrations and deaths were identified among them over a period of up to 10 years. One hundred and eleven cancers were identified after the start of cimetidine treatment: 71 were adenocarcinomas of the stomach, 27 were carcinomas of the cardia and/or oesophagus (22 adenocarcinomas, five unknown histology) and the remaining 13 tumours were squamous cell cancers of the oesophagus. Only six patients presented with early gastric cancers. Over a period of eight years the ratio of observed to expected (O/E) gastric cancer deaths has fallen from 10.7 (p < 0.001) to 1.2 (NS). The O/E ratio of oesophageal cancer deaths also fell over the first six years of study, from 5.4 (p < 0.01) to 1.4 (NS) but it has risen slightly in years 7 and 8 to 3.7 (p < 0.05). These findings do not suggest that there is an increased risk of developing oesophageal or gastric cancer from cimetidine treatment, and are generally consistent with cimetidine being used inadvertently to treat the early symptoms of gastric and oesophageal cancer. The slight rise in oesophageal cancer deaths in years 7 and 8 was unexpected and will be the subject of further observation.