Cory Monteith, the Canadian star of the wildly popular TV musical series "Glee", died of an accidental overdose of heroin and alcohol, the British Columbia coroner's office said.
The office earlier had released the drugs involved at the time of his death but had not stated if the death was believed a suicide or an accident.
"Coroner Claire Thompson concluded that Mr. Monteith, aged 31, died of mixed drug toxicity, involving intravenous heroin use combined with the ingestion of alcohol," coroner's office spokeswoman Barb McLintock said.
"The death has been ruled accidental," the statement added.
Monteith, who had struggled in the past with substance abuse and checked into a rehab facility in April, was found dead July 13 in his Vancouver hotel room.
Monteith starred on "Glee" as Finn Hudson, a star high school football player who joined a motley crew of students in the glee club.
In the most recent season, he returned as a graduate coaching new singers.
Off-screen, Monteith dated his co-star Lea Michele, with whom he sang the show's signature cover of Journey's "Don't Stop Believin'."
Before shooting to huge fame on the Fox hit musical show, Monteith had played minor roles in TV series such as "Smallville" and "Kyle XY."