Mac Miller died at age 26 on September 7 from mixed drug toxicity, Us Weekly confirms.

An autopsy performed by the Los Angeles coroner’s office revealed that Miller had fentanyl, cocaine and alcohol in his system at the time of his death, which was certified as an accident.

The LAPD confirmed to Us Weekly in September that it responded to a call in the Studio City neighborhood of Los Angeles and found Miller dead after 11 a.m. local time.

The “Programs” rapper, born Malcolm James McCormick, had been open about his substance abuse struggles, specifically his addiction to the promethazine-codeine combination known as “lean.”

“I was not happy and I was on lean very heavy,” told Complex in 2013, recalling his Macadelic tour the previous year. “I was so f—ked up all the time it was bad. My friends couldn’t even look at me the same. I was lost.”

He kicked that addiction in November 2012 before the filming of his reality show, Mac Miller and the Most Dope Family, according to the magazine.

“For how much [lean] he was drinking,” friend Jimmy Murton told Complex, “it’s unbelievable that he stopped. It’s definitely one of the most impressive things he’s ever done.”

Miller had another setback in May when he was arrested on DUI and hit-and-run charges after running his 2016 Mercedes-Benz G-Wagon into a utility pole. He fled the scene but later confessed to the incident, the Los Angeles Police Department told Us at the time.

If you or someone you know is struggling with substance abuse, contact the Substance Abuse and Mental Health Services Administration (SAMHSA) National Helpline at 1-800-662-HELP (4357).