Tom Petty, the chart-topping singer and songwriter, died in October from an accidental drug overdose as a result of mixing medications that included opioids, the medical examiner-coroner for the county of Los Angeles announced on Friday, ending the mystery surrounding his sudden death last year.

The coroner, Jonathan Lucas, said that Mr. Petty’s system showed traces of the drugs fentanyl, oxycodone, temazepam, alprazolam, citalopram, acetyl fentanyl and despropionyl fentanyl.

Barely a week after Mr. Petty, 66, had concluded a tour with his band, the Heartbreakers, with three shows at the Hollywood Bowl, representatives said the singer had suffered cardiac arrest at his home in Malibu, Calif. on Oct. 2. But Mr. Petty’s official death certificate, released about a week later, listed his cause of death as “deferred” pending an autopsy.

In a statement posted to Mr. Petty’s Facebook page on Friday, his wife, Dana, and daughter, Adria, wrote that Mr. Petty suffered from “many serious ailments including emphysema, knee problems and most significantly a fractured hip,” but that he continued to tour, worsening his conditions. “On the day he died he was informed his hip had graduated to a full on break and it is our feeling that the pain was simply unbearable and was the cause for his over use of medication,” the statement said.