ObjectiveTo identify individual and initial prescription-related factors associated with an increased risk for opioid-related misuse, poisoning and dependence (MPD) in patients with non-cancer pain.MethodsCohort study linking several databases covering 5 million inhabitants of the region of Valencia, Spain, including all adults initiating prescription opioids in the period 2012–2018. To ascertain the association between the characteristics of the initial prescription choice and the risk of opioid MPD, we used shared frailty Cox regression models. We additionally considered death as a competing risk in sensitivity analyses.Results959 286 patients initiated opioid prescription from 2012 to 2018, of which 0.13% experienced MPD. Most patients were prescribed tramadol as initial opioid (76.7%) followed by codeine (16.3%), long-acting opioids (6.7%), short-acting opioids (0.2%) and ultrafast opioids (0.1%). Initiation with ultrafast (HR 7.2; 95% CI 4.1 to 12.6), short-acting (HR 4.8; 95% CI 2.3 to 10.2) and long-acting opioids (HR 1.5; 95% CI 1.2 to 1.9) were associated with a higher risk of MPD when compared with tramadol. Initial prescriptions covering 4–7 days (HR 1.3; 95% CI 1.0 to 1.8), 8–14 days (HR 1.4; 95% CI 1.0 to 1.9), 15–30 days (HR 1.7; 95% CI 1.2 to 2.3) and more than one a month (HR 1.8; 95% CI 1.3 to 2.5) were associated with more MPD risk than initial prescriptions for 1–3 days. Treatments with >120 daily morphine milligram equivalents (MME) increased MPD risk (vs <50 MME, HR 1.6; 95% CI 1.1 to 2.2). Main individual factors associated with increased risk of MPD risk were male sex (HR 2.4; 95% CI 2.1 to 2.7), younger age (when compared with patients aged 18–44 years, patients aged 45–64 years, HR 0.4; 95% CI 0.4 to 0.5; patients aged 65–74 years, HR 0.4; 95% CI 0.3 to 0.5 and patients aged 75 years old and over, HR 0.7; 95% CI 0.6 to 0.8), lack of economic resources (2.1; 95% CI 1.8 to 2.5) and registered misuse of alcohol (2.9; 95% CI 2.4 to 3.5). Sensitivity analyses yielded overall comparable results.ConclusionsOur study identifies riskier patterns of opioid prescription initiation for non-cancer indications, as well as patient subgroups with higher risk of misuse, poisoning and dependence.