BACKGROUND: Although it is well known that analgesics contribute to suicide, there is little knowledge about how much of the mortality and suicide can be explained by socioeconomic deprivation or by sales of analgesics. METHODS: This ecological study analyses the relationships between the sales (defined daily doses per 1000 inhabitants per day) of dextropropoxyphene, dextropropoxyphene combinations, paracetamol, codeine and paracetamol combinations, and other codeine combinations and the Swedish UPA (underprivileged area) score, mortality and suicide rates in 33 municipalities in Sk?ne in 1987 and 1994 for people aged 20-64 years. The association of each of the subgroups of analgesics with all-cause mortality, and with standardised mortality rates for suicide, adjusted for UPA score, was investigated by using weighted (by population size) regression analysis. RESULTS: In 1994 there was a moderate to strong significant correlation between sales of analgesics and UPA scores, mortality and suicide (r = 0.49-0.78). Although UPA score explained 68.9% and 67.4% respectively of the variance between the analgesics and all-cause mortality and suicide, codeine and paracetamol combinations explained a further 10.1% of the variance in suicide. Dextropropoxyphene and codeine and paracetamol combinations explained an additional 3.8% and 2.9% respectively of the variance in mortality. CONCLUSIONS: Local prescription rates for analgesics were associated with mortality and suicide, when adjusted for socioeconomic deprivation defined as UPA score.