LOS ANGELES -- The family of Chris Cornell and a doctor who they alleged over-prescribed him drugs before he died have agreed to a settle a lawsuit.

Court documents filed by attorneys for the rock singer's widow, Vicky Cornell, and their children, Toni and Christopher Nicholas Cornell, said a confidential settlement had been reached. The documents were filed in April, but they had gone unnoticed before City News Service reported on them Thursday.

The Cornell family alleged in the lawsuit filed in 2018 in Los Angeles Superior Court that medication, especially the anti-anxiety drug lorazepam, prescribed by Dr. Robert Koblin led to erratic behaviour from the Soundgarden front man before his death in Detroit in 2017 at age 52.

Coroner's investigators in Michigan ruled Cornell's death a suicide by hanging. Tests showed the presence of lorazepam, better known by its brand name Ativan, in Cornell's system along with barbiturates and the anti-opioid drug naloxone, but did not cite them as a factor in his death.

The lawsuit said Koblin and his Beverly Hills, California, office "negligently and repeatedly" prescribed "dangerous mind-altering controlled substances to Chris Cornell which impaired Mr. Cornell's cognition, clouded his judgment, and caused him to engage in dangerous impulsive behaviours that he was unable to control, costing him his life."

The lawsuit said the doctor did this knowing Cornell had a serious history of substance abuse.

In court documents responding to the lawsuit, Koblin and his attorney denied any wrongdoing or responsibility for Cornell's death.

Emails seeking comment sent Thursday night to attorneys for both sides were not immediately returned.

"After years of litigation and settlement negotiations, Plaintiffs and Defendants ... have reached a confidential settlement agreement to resolve all claims," the Cornell family attorneys said in the April 2 court filing.

The document said essential to the compromise was the agreement to minimize publicity and keep the terms confidential.

The case has "received significant media coverage and attention from fans of Mr. Cornell and allies of Plaintiffs," the court filing says. "Unfortunately, as with many celebrity cases, this action has also attracted the attention of troubled individuals who have harassed Plaintiffs, including by threatening the life and safety of Plaintiffs Toni Cornell and Christopher Nicholas Cornell."

A judge must still approve the parts of the settlement that involve the children, who are both minors, and the documents say the lawsuit will proceed toward trial if that doesn't happen.

Cornell's wailing voice and his long-haired, shirtless stage presence made him an essential figure in the grunge rock of the 1990s. Soundgarden was among the first groups to surge to national attention in a wave that later included Nirvana, Pearl Jam and Alice in Chains.