Study objective - To analyse the relation between coffee consumption and mutations in the K-ras gene in exocrine pancreatic cancer. Design - Case-case study. Consumption of coffee among cases with the activating mutation in the K-ras gene was compared with that of cases without the mutation. Setting and patients - All cases of pancreatic cancer newly diagnosed at five hospitals in Spain during three years were included in the PANKRAS II Study (n = 185, of whom 121 whose tissue was available for molecular analysis are the object of the present report). Over 88% were personally interviewed in hospital. DNA was amplified from paraffin wax embedded tissues, and mutations in codon 12 of K-ras were detected by the artificial RFLP technique. Main results - Mutations were found in tumours from 94 of 121 patients (77.7%). Mutations were more common among regular coffee drinkers than among non-regular coffee drinkers (82.0% v 55.6%, p = 0.018, n = 107). The odds ratio adjusted by age, sex, smoking and alcohol drinking was 5.41 (95% CI 1.64, 17.78). The weekly intake of coffee was significantly higher among patients with a mutated tumour (mean of 14.5 cups/week v 8.8 among patients with a wild type tumour, p < 0.05). With respect to non-regular coffee drinkers, the odds ratio of a mutated tumour adjusted by age, sex, smoking and alcohol drinking was 3.26 for drinkers of 2-7 cups/week, 5.77 for drinkers of 8-14 cups/week and 9.99 for drinkers of ≥ 15 cups/week (p < 0.01, test for trend). Conclusions - Pancreatic cancer cases without activating mutations in the K-ras gene had drank significantly less coffee than cases with a mutation, with a significant dose response relation: the less they drank, the less likely their tumours were to harbour a mutation. In exocrine pancreatic cancer the K-ras gene may be activated less often among non-regular coffee drinkers than among regular drinkers. Caffeine, other coffee compounds or other factors with which coffee drinking is associated may modulate K-ras activation.