Within the Seven Countries Study, we investigated whether population differences in 25-year cancer mortality and mortality due to cancer of the lung, stomach, and colorectum could be explained by population differences in adherence to the European Code Against Cancer. Baseline surveys were carried out around 1960 on 12,763 middle-aged men constituting 16 cohorts in seven countries; small samples of the cohorts kept dietary records. In 1987, food equivalent composites representing the average food intake of each cohort at baseline were collected locally and analyzed in one central laboratory. The vital status of all participants was verified after 25 years of follow-up. Overall adherence to the first four recommendations of the European Code Against Cancer was inversely related to 25-year total cancer mortality but not to all-cause mortality. The association with cancer mortality was essentially due to the inverse association for adherence to the guideline on smoking only. Each decrease in the percentage of smokers of 3.4% (10% of range) was associated with a relative risk of 0.93 of dying from cancer. Adherence to the recommendation on consumption of vegetables, fruits, and fiber-rich cereals was inversely related to stomach cancer mortality, whereas adherence to the recommendation on body weight, physical activity, and intake of fat was associated with higher stomach cancer mortality.