The relationship between diabetes mellitus and primary liver cancer was investigated in a case-control study conducted in Italy between 1984 and 1996 on 428 cases with incident, histologically confirmed hepatocellular carcinoma, 59 with gallbladder and bile duct cancer, and 1,502 control subjects in the hospital for acute non-neoplastic diseases. Sixty-four cases of hepatocellular carcinoma vs. 87 controls reported a history of diabetes, corresponding to an odds ratio (OR) of 2.3 after allowance for age, sex and area of residence, and of 2.1 [95% confidence interval (CI) = 1.4–3.2] after further allowance for alcohol and tobacco consumption, history of hepatitis and liver cirrhosis, body mass index and history of liver cancer in first-degree relatives. The ORs were similar both for subjects diagnosed with diabetes below age 45, who most likely had insulin-dependent diabetes, and for those diagnosed later, who were likelier to have non-insulin-dependent diabetes. The OR was 2.3 for subjects whose diabetes was diagnosed <5 years before diagnosis of liver cancer, 1.9 for those diagnosed 5–9 years in advance and 2.2 for those diagnosed since 10 years or more. Five cases of gallbladder and bile duct cancer reported a history of diabetes: the corresponding OR was 1.2 (95% CI 0.5–2.9). The OR of hepatocellular carcinoma was 2.4 for males and 2.0 for females, 3.0 for subjects diagnosed with liver cancer under age 60 and 1.8 for those diagnosed at age 60 or over. None of the other covariates considered, including education, history of hepatitis, liver cirrhosis and alcohol drinking showed any meaningful modifying effect or interaction. The potential pathogenic mechanisms include liver alteration—and consequent cell proliferation—in subjects with diabetes. Thus a history of diabetes mellitus could explain about 8% (95% CI 5–11) of cases of liver cancer in this population. Int. J. Cancer 73:204–207, 1997. © 1997 Wiley-Liss, Inc.