Epidemiological studies have suggested that socioeconomic conditions, including dietary factors, can affect the risk of several gastric cancers. Anthropometric indices, such as body weight and adult height, have been considered as measurements of prevailing diet and nutrition, respectively, in early life. The objective of this study was to evaluate the association between body mass and height and the risk of cancer of the oesophagus and stomach. The analysis was based on data from a national Norwegian screening programme for tuberculosis, which ran from 1963 to 1975, screening more than 1,100,000 individuals, aged 30-69 years at the time of examination. The participants were followed until December 1989. Body weight (expressed as Quetelet's index (QI) and height records were linked with vital status data from Statistics Norway and the Cancer Registry of Norway. Individuals in the first quintile of height appear to have an increased risk of oesophageal cancer in both sexes. Low QI was found to increase the risk for oesophageal squamous cell carcinoma, whereas high QI was linked to an elevated risk of oesophageal adenocarcinoma. The analysis reveals a relationship between low QI and the risk of stomach cancer. There were no associations between stomach cancer and height. These associations indicate that prevailing and early life conditions could play a role in later cancer development; they support the hypothesis that anthropometric indices are important as markers for the risk of oesophageal cancer and, to some extent, for cancer of the stomach.