Background: The aetiology of idiopathic pulmonary fibrosis remains poorly understood, but recent studies have suggested that diabetes mellitus and gastro-oesophageal reflux may be risk factors. Objective: To test possible associations between diabetes mellitus and gastro-oesophageal reflux with idiopathic pulmonary fibrosis in the general population. Methods: We designed a case-control. study in the setting of UK general practices contributing data to The Health Improvement Network primary care database (THIN). We selected patients over 40 years of age with a first diagnosis of idiopathic pulmonary fibrosis, and up to 4 controls per case matched by age, gender, and general practice. We estimated odds ratios for exposure to gastro-oesophageal reflux, gout, hypercholesterolaemia and diabetes mellitus using conditional. Logistic regression. We explored the role of confounding by smoking habit, socioeconomic status, and medication with prednisolone. Results: Amongst our 920 cases we found increased risks of use of insulin (odds ratio (OR) 2.36; 95% confidence interval (CI) 1.46-3.83) and use of ulcer drugs (OR 2.20; 95% CI 1.88-2.58). These were almost unchanged when we excluded cases and controls who had been prescribed prednisolone. We found no association with hypercholesterolaemia or gout, nor with smoking status or socio-economic status. Conclusions: The study provides further evidence of an association between idiopathic pulmonary fibrosis and both diabetes mellitus and gastro-oesophageal reflux. (C) 2008 Elsevier Ltd. All rights reserved.