Simple SummaryLiver cancer is often used as a general term for cancers of the liver (hepatocellular carcinoma, HCC), the gallbladder, and the bile ducts. The well-known risk factors are alcohol and viral hepatitis, but these are risk factors of mainly HCC. For gallbladder cancer, gallstones are important risk factors, and for bile ducts, infections in the ducts are important. For all these cancers, autoimmune diseases and diabetes increase risk. This study shows that these risk factors, in combination, explain 50% or more of the causes of these cancers. The novelty of the present study was the use of national Swedish hospital records for potential risk factors (comorbidities) of hepatobiliary cancers and the estimation of subsequent risks of hepatobiliary cancers in these patients. The underlying mechanism for these cancers is a chronic infection which should be considered a marker of disease progression and a possible target for intervention.AbstractBackground: We aim to estimate population-attributable fractions (PAF) for 13 comorbidities potentially predisposing to hepatobiliary cancer of hepatocellular carcinoma (HCC), gallbladder cancer (GBC), cancers of the intrahepatic and extrahepatic bile ducts (ICC and ECC), and ampullary cancer. Methods: Patients were identified from the Swedish Inpatient Register from 1987 to 2018 and cancers from the Swedish Cancer Registry from 1997 through 2018. PAFs were calculated for each comorbidity-associated cancer using a cohort study design. Results: For male HCC, the major individual comorbidities (PAF > 10) were diabetes, alcohol-related liver disease, and hepatitis C virus infection. For female HCC, diabetes and autoimmune diseases were important contributors. For female GBC, gallstone disease was an overwhelming contributor, with a PAF of 30.57%, which was also important for men. The overall PAF for male ICC was almost two times higher than the female one. For ECC and ampullary cancer, infection of bile ducts was associated with the highest PAF. Conclusions: The 13 comorbidities accounted for 50% or more of the potential etiological pathways of each hepatobiliary cancer except female ICC. The underlying convergent mechanism for these cancers may be chronic inflammation lasting for decades and thus offering possibilities for intervention and disease monitoring.