Tom Petty, the singer and guitarist whose influential music spanned four decades, died in October from an accidental drug overdose as a result of mixing medications involving opioids, his family announced Friday.

A Los Angeles County medical examiner-coroner’s report reveals that Petty had traces of multiple opioids including fentanyl in his system when he died at age 66 after being found unconscious at his home in Malibu, Calif. He had suffered cardiac arrest.

The cause of his death had until Friday remained a mystery. For months, his fans wondered what killed Petty after his death certificate, released about a week later, registered the cause of death as “deferred” pending an autopsy. He died a week after concluding a nationwide tour with his band, the Heartbreakers. He told Rolling Stone at the time that the tour might be his last. “I don’t want to spend my life on the road,” he said.

Petty’s wife, Dana Petty, and his daughter, Adria Petty, wrote in a statement posted to the band’s website and Facebook page that Petty had suffered from emphysema, knee problems and a fractured hip. Out of commitment to his fans, he toured for 53 dates with the fractured hip. But the pain soon became unbearable and led Petty to turn to medication, the family said.

“We knew before the report was shared with us that he was prescribed various pain medications for a multitude of issues including Fentanyl patches and we feel confident that this was, as the coroner found, an unfortunate accident,” the family wrote.

Our family sat together this morning with the Medical Examiner – Coroner’s office and we were informed of their final…

Posted by Tom Petty and the Heartbreakers on Friday, January 19, 2018

The family shared the coroner’s report to “spark a further discussion on the opioid crisis.”

“We hope in some way this report can save lives,” the family wrote.

Fentanyl, a synthetic narcotic about 50 times stronger than heroin, is linked to thousands of overdoses and fatalities across the country. Fentanyl-related deaths increased nearly 600 percent from 2014 to 2016 in 24 of the nation’s biggest cities, according to health departments. A report by The Washington Post last year showed 582 fatal overdoses from fentanyl in 2014, followed by a surge to 3,946 such deaths in 2016.

Petty in 2015 opened up about his addiction to heroin in the 1990s. Petty for decades had kept the addiction a secret and, before talking about it to biographer Warren Zanes, told him: “I am very concerned that talking about this is putting a bad example out there for young people. If anyone is going to think heroin is an option because they know my story of using heroin, I can’t do this.”

“I think you’re going to come off as a cautionary tale rather than a romantic tale,” Zanes recalled telling Petty, according to The Washington Post’s Geoff Edgers.

Legendary recording artist Tom Petty died at a Los Angeles hospital on Oct. 2, after being found unconscious at his Malibu home. (Erin Patrick O'Connor/The Washington Post)

Prince in 2016 also died from a fentanyl overdose a week after the pop singer’s plane made an emergency stop in Moline, Ill., for him to receive medical treatment as he was returning from an Atlanta concert.

Petty broke into the rock-and-roll scene with the Heartbreakers in the 1970s with songs that included “Free Fallin’,” “I Won’t Back Down” and “American Girl.”

His family said they were proud Petty could still perform those songs for his fans on his 40th anniversary tour last year.

“We now know for certain he went painlessly and beautifully exhausted after doing what he loved the most, for one last time, performing live with his unmatchable rock band for his loyal fans on the biggest tour of his 40 plus year career,” Petty’s family wrote.

Read more: