This study investigated whether the association between depression and diabetes was influenced by the presence of chronic somatic disease. To distinguish between depression and other psychosocial complaints, we studied the onset of diabetes in antidepressant (AD) users and benzodiazepine (BD) users, respectively. From the PHARMO database, which includes complete drug prescription data, we identified subjects using (i) no ADs and no BDs; (ii) AD but no BD; (iii) BD but no AD; and (iv) AD and BD. A total of 60 516 individuals (age: 45.5+/-17 years; 42.1% men) were followed from their first prescription for AD or BD until end of registration or a first prescription for antidiabetic drugs. The crude incidence rate in AD but no BD users was not increased compared with no AD and no BD users. After adjustment for age, sex and chronic diseases, the hazard ratios (95% confidence interval) were 1.05 (0.88-1.26) for AD but no BD users, 1.21 (1.02-1.43) for BD but no AD users and 1.37 (1.12-1.68) for AD and BD users compared with no AD and no BD users. We did not find an increased risk of diabetes in individuals using ADs. The association between BD use and diabetes was partly explained by chronic somatic comorbidity.