Just over a month ago, on April 21, legendary singer and guitarist Prince was found dead in his Paisley Park mansion in Minnesota. Rumors swirled around his death, with the primary theory being that Prince succumbed to a fatal drug overdose at the age of 57. Now, the Associated Press is confirming those rumors — AP Midwest editor Tom Berman tweeted that the toxicology tests performed after Prince’s autopsy showed that the singer died of an opioid overdose.

According to the LA Times, Prince saw a doctor the day before his death, who prescribed him an opioid painkilling drug. The singer had apparently struggled with addiction and opioid overdoses in the weeks leading up to his death, as he was found unconscious on a private plane six days before his death and reportedly treated for an overdose.

Prescription painkillers, particularly strong opiates like methadone and codeine can be extremely habit-forming, especially in middle-age and older patients using them for chronic pain. They’re also easy to build up a resistance to, leading patients to dose themselves with larger and larger amounts and running the risk of overdose. It appears Prince fell victim to a growing epidemic of sometimes-inadvertent drug abuse in aging Americans, as AP reports a longtime friend of the singer said he struggled with chronic pain from performing on stage.

He’ll be remembered by his music and the legion of tributes to his work.

Photos via Getty Images / Kevork Djansezian