Rapper Mac Miller died from a mix of the powerful opioid fentanyl, cocaine and alcohol, the Los Angeles medical examiner announced Monday.

The 26-year-old rapper died in September after being discovered unresponsive in his Studio City home. Authorities performed an autopsy on Miller the following day but "a cause of death was deferred pending further investigation," the medical examiner's office said in a release.

It took months to complete the toxicology report, which revealed that Miller had the deadly mix of drugs in his system. The coroner ruled the official manner of death as an accident.

Fentanyl, a synthetic opioid, is 50 to 100 times stronger than morphine. While used to treat severe pain, like that experienced by cancer patients, illegally made fentanyl is often mixed with heroin or cocaine, according to the Centers for Disease Control and Prevention. Last year, the country experienced a record number of drug overdoses, an increase driven by synthetic opioid use, the CDC found.

Several recent high-profile deaths have also been linked to the drug. Prince died at 57 in April 2016, and a medical examiner ruled it an accidental overdose, finding fentanyl in his system. Tom Petty, 66, died in October 2017 from an accidental overdose after mixing medications, including the opioid.

Miller's death rocked the music community. A "Celebration of Life" concert with performances from Chance the Rapper, John Mayer, SZA, Travis Scott, Miguel and Anderson .Paak was held last month in Los Angeles and live-streamed on Miller's official Facebook page.

After Miller's death, his family released a statement calling him "a bright light in this world for his family, friends and fans."

Born Malcom McCormick in Pittsburgh, Mac Miller became a sensation in 2011 with his album "Blue Slide Park," which debuted at No. 1 debut on the Billboard 200 chart. But critical pans accompanied his success, and he had been candid about his struggles with stress, depression and drugs.

Just before his death, Miller had announced a joint tour with Thundercat, to start in October. And a Vulture profile published the day before he died painted a picture of a musician who mostly "spends his days relatively upbeat and preoccupied with music, and also with working out and balancing his diet," while also "not above mistakes and indulgences," including a DUI charge in months earlier.

“I used to rap super openly about really dark” things, Miller told Vulture, “because that’s what I was experiencing at the time. That’s fine, that’s good, that’s life. It should be all the emotions.”