After several months of speculation, the Los Angeles County Medical Examiner has ruled that Tom Petty died of an accidental overdose, Rolling Stone reports. An array of prescription painkillers, including the dangerous injectable opioid fentanyl, was found in his system.

The coroner’s office listed Petty’s official cause of death as “multi system organ failure due to resuscitated cardiopulmonary arrest due to mixed drug toxicity,” noting that the Rock & Roll Hall of Fame musician also suffered from coronary artery disease and emphysema. At the time of his death, Petty was taking several painkillers, including fentanyl, oxycodone and a generic version of the anti-anxiety drug Xanax. Other medications included generic versions of the sleep aid Restoril and Celexa, which is used to treat depression.

Petty’s family said in a statement that Petty had been prescribed the drugs to treat his emphysema, knee issues and a fractured hip. On the day he died, Petty’s wife, Diana, said the musician had been told his injured hip had graduated to a full-on break. It’s her feeling that the pain was too much for him to bear and ultimately caused his overuse of medication.

At the time of his death, the singer had recently finished up a 40th anniversary tour with his band, the Heartbreakers. He was found unconscious and not breathing in his Malibu home on October 2 and was put on and subsequently taken off life support hours later at a hospital. Until now, the cause of his death had not been determined.

Petty’s death serves as a grim reminder for those living with chronic pain and a history of substance use issues of the risks associated with prescription painkillers. Petty had in the past been vocal about his addiction to heroin in the late ’90s, for which he sought treatment. His family said they hope his death leads to a broader understanding of the opioid crisis and the potentially deadly nature of prescription medications.