A cohort of 5,546 ulcerative colitis patients was identified from the Danish Hospital Discharge Register for 1977-1989. Patients not included in the cohort comprised those with proctitis, those treated in outpatient clinics and those for whom follow-up was less than 1 year. The cohort was linked to the Danish Cancer Registry in order to assess the risks for colorectal and other cancers. The linkage revealed a significant increase in the number of colorectal cancers over that in the general population (RR = 1.8; n = 42; 95% CI = 1.3-2.4) with consistent relative risks during early and late follow-up. The relative risk was considerably higher among younger (20-39 years: RR = 22; n = 8; 95% CI = 9.7-44) than older patients (> or = 60 years: RR = 1.3; n = 25; 95% CI = 0.8-1.9), but the risk difference between patients and the general population was approximately constant across all ages. In addition, we observed a significant increase in the relative risk of hepatobiliary cancers (RR = 2.3; n = 9; 95% = 1.0-4.3) and a slight but significant increase in the relative risk of non-melanoma skin cancer (RR = 1.4; n = 37; 95% CI = 1.0-1.9). In summary, our population-based study confirms the increased risk of colorectal cancer among patients with ulcerative colitis and provides new leads suggesting that hepatobiliary cancer and non-melanoma skin cancer should be considered as possible sites for future patient monitoring.