For years, doctors turned to opioid painkillers as a first-line treatment for chronic back pain and aches in the joints. Even as the dangers of addiction and overdoses became more clear, the drugs’ pain-relieving benefits were still thought to justify their risks.

Now researchers have hard data that challenges this view.