ATLANTA — The family of a longtime guitarist for 3 Doors Down is accusing an Alabama doctor of fueling the rocker’s opioid addiction before he died of a drug overdose.

Matthew Roberts, 38, was found dead in August 2016 in the hallway of a hotel outside Milwaukee, where he was to perform in a charity concert.

In a lawsuit filed recently in Alabama, Roberts’ family says Dr. Richard Snellgrove began prescribing high levels of opioids to the musician in 2006.

The prescriptions continued for years, with one break when Roberts sought help at an Arizona rehabilitation center, until days before his death.

“It’s unfortunate that Mr. Roberts passed away, but Mr. Roberts passed away because of his abuse of his prescriptions in addition to using other drugs that weren’t associated with his prescriptions,” said Dennis Knizley, who is defending Snellgrove in a separate federal criminal case that arose from the death. “It was definitely unfortunate, but it’s certainly not at the hands of Dr. Snellgrove.”

In the criminal case, Snellgrove faces charges of distributing medications for no legitimate medical need, according to court records in U.S. District Court in Alabama’s southern district.

Fentanyl is “the drug at the center” of the criminal case, prosecutors wrote in court documents.

The death of the musician Prince in April 2016 was blamed on an accidental overdose of fentanyl. And a coroner found that rock artist Tom Petty had a mix of painkillers — including fentanyl — in his system when he died last year.

In Alabama, prosecutors cited Snellgrove’s own medical records in outlining one reason they say he was prescribing patches containing fentanyl for Roberts: The musician “was in the studio producing a new album and playing the guitar and his hand pain is increasing but he has to do the job,” prosecutors wrote in court records.

A trial date in the criminal case has been set for May, Knizley said.

“We fully anticipate the case to be tried to a jury,” the lawyer said. “He has done nothing but engage in proper medical care for this patients and all the other patients that he’s seen.”

Other defendants named in the lawsuit include Rite Aid pharmacies, which the family said failed to report Roberts’ suspected drug abuse to state and federal authorities. A representative of Pennsylvania-based Rite Aid on Thursday said she’d look into the case to see whether she could comment.

Roberts was a founding member of 3 Doors Down when the rock group began in 1996 in south Mississippi.

He co-authored the band’s hit song “Kryptonite,” which in 2001 was nominated for a Grammy award for best rock song.

Snellgrove began prescribing opioids to Roberts in 2006, which involved 178 prescriptions for opioids and other drugs from that time until the winter of 2012, the lawsuit states.

After the band’s 2012 European tour, Roberts left the band and checked into the Arizona center, court records state. He didn’t rejoin 3 Doors Down, but continued to play guitar. (He had gone to Wisconsin to perform with another band in a benefit concert involving the military when he died).

In 2014, Snellgrove resumed prescribing “high levels of opioids” to Roberts along with other drugs, the lawsuit maintains.

It includes a chart of 88 prescriptions from the fall of 2014 through Aug. 18, 2016.

On Aug. 20, 2016, Roberts was found dead in the hallway of a hotel in West Bend, Wis., with a guitar case beside him and a patch that delivers fentanyl on his body, a special agent with the U.S. Drug Enforcement Administration wrote in an affidavit.

A medical examiner later ruled the cause of death to be an overdose involving fentanyl, hydrocodone and alprazolam, the affidavit stated.