Recently, the incidence of intrahepatic cholangiocarcinoma (ICC) has been increasing in a number of developed (Western) countries. However, risk factors in these low-risk populations are poorly understood. In this nationwide population based case-control study in Denmark, we examined the relationship between selected medical conditions and subsequent ICC risk to provide additional clues to etiopathogenesis. All histologically confirmed ICC cases diagnosed in Denmark between 1978 and 1991 were identified from the Danish cancer registry. Population controls were selected from the central population registry and were matched 4:1 to cases on sex and year of birth. Cases and controls were linked to the Danish hospital discharge registry to obtain information on prior hospital diagnoses. Odds ratios (OR) and 95% confidence intervals (95% CI) were derived using conditional logistic regression. A total of 764 ICC cases and 3,056 population controls were included in the study. Chronic liver diseases were significantly related to ICC: alcoholic liver disease (OR = 19.22, 95% CI = 5.55-66.54), unspecified cirrhosis (OR = 75.9, 95% CI 10.2-565.7). Bile duct diseases were also associated with risk: cholangitis (OR = 6.3, 95% CI = 2.3-17.5), choledocholithiasis (OR = 23.97, 95% CI = 2.9-198.9), cholecystolithiasis (OR = 4.0, 95% CI = 2.0-7.99), though gallbladder removal did not change risk (OR = 1.6, 95% CI = 0.65-3.7). Among other conditions, chronic inflammatory bowel disease (OR = 4.7, 95% CI = 1.65-13.9) was significantly associated with ICC. Diabetes was associated with risk in the year prior to diagnosis of ICC (OR = 3.02, 95% CI = 1.05-8.69). Obesity was unrelated to risk. These results confirm that prior bile duct diseases increase risk of ICC and suggest that alcoholic liver disease and diabetes may also increase risk.