Background Despite recent concerns about increasing rates of analgesic prescribing, detailed epidemiological studies are lacking. We identified and described changes in the pattern of community-dispensed prescriptions to the Tayside population, Scotland, between 31st March 1995 (n = 301,020) and 31st March 2010 (n = 311,881). Methods Repeated cross-sectional analysis of patient-level population data on dispensed analgesics, stratified by sociodemographic variables; logistic regression to identify factors associated with strong opioid dispensing in 2010. Results The proportion of people currently dispensed any analgesic increased in 2010 (17.9%) compared with 1995 (15.7%). This increase was not equal across drug classes, with paracetamol, opioids and gabapentin/pregabalin showing an increase, but others showing a decrease. Weak opioids were less commonly dispensed in 2010 (8.2% vs. 8.4%) but dispensing of strong opioids increased 18-fold (3.6% vs. 0.2%), including a five-fold increase of morphine, fentanyl or oxycodone (0.75% vs. 0.15%). People receiving more non-analgesic drugs (odds ratio 20.7 if dispensed >14 non-analgesic medications vs. those dispensed <4) and those living in more deprived areas (OR 1.63 most deprived vs. most affluent) were more likely to receive a strong opioid in 2010. Conclusions Analgesic use rose modestly between 1995 and 2010, but with larger changes within individual classes, only partly reflecting evidence-based guidance. Dispensing of strong opioids increased dramatically, largely driven by tramadol, although other strong opioids tripled. Polypharmacy and socio-economic deprivation were strongly associated with strong opioid use. Research is needed to establish the causes, benefits and harms of the increase in analgesic, and especially strong opioid use.