Relatives of Prince are suing a Twin Cities doctor who prescribed him narcotics before his death, alleging that the physician failed to properly diagnose and treat the rock idol’s opioid addiction.

The wrongful-death lawsuit accuses Dr. Michael Schulenberg and by proxy his employer, North Memorial Health Care, of twice administering powerful painkillers without a legitimate medical purpose in the days preceding Prince’s death.

“He failed to appropriately evaluate, diagnose, treat and counsel Prince for his recognizable opioid addiction, and further failed to take appropriate and reasonable steps to prevent the foreseeably fatal result of that addiction,” the lawsuit says of Schulenberg, a family physician. “These departures from the standard of acceptable medical practice had a substantial part in bringing about Prince’s death.”

Paul C. Peterson, a Minneapolis attorney representing Schulenberg, said he believes the case lacks merit.

“We understand this situation has been difficult on everyone close to Mr. [Prince Rogers] Nelson and his fans across the globe,” he said in a written statement to the Star Tribune. “Be that as it may, Dr. Schulenberg stands behind the care that Mr. Nelson received. We intend to defend this case.”

Prince, 57, died April 21, 2016, of an accidental fentanyl overdose. Fentanyl is considered 50 times more powerful than heroin.

Carver County closed a two-year investigation into Prince’s death this spring without issuing criminal charges. County Attorney Mark Metz said that county, state and federal investigators were unable to determine who provided Prince with the massive dose of fentanyl, disguised as counterfeit Vicodin.

Federal search warrants carried out after the discovery of Prince’s body at Paisley Park disclosed that Schulenberg admitted to writing prescriptions for Prince’s longtime bodyguard and associate, Kirk Johnson, knowing they were actually for Prince.

In April, Schulenberg agreed to a $30,000 federal settlement for allegedly prescribing Percocet (not fentanyl) to Prince under Johnson’s name to protect Prince’s privacy, though he’s disputed that.

Schulenberg’s lawyers contend that he ultimately agreed to settle to avoid the “expense, delay, and unknown outcome of litigation.” As part of the agreement, he entered a two-year period of heightened compliance with the Drug Enforcement Administration for logging and reporting all of his prescriptions of controlled substances — including quantity, strength and dosage.

Investigators do not suspect that the doctor had any role in supplying the fentanyl that caused Prince’s death.

On Friday, Prince’s family attorney, John Goetz, told the Associated Press that they now have sufficient legal grounds to pursue the lawsuit in Prince’s home state.

“Prince lived in Minnesota all his life and passed away here, so we always thought his family’s lawsuit belonged in Minnesota,” Goetz said.

In 2016, Prince’s heirs sued the Moline, Ill., hospital that treated him for an opiate overdose less than a week before his death.

The newest lawsuit also names UnityPoint Health, which operates the Illinois hospital, and Walgreens Co., which operates two drugstores where Prince got prescriptions filled. It seeks unspecified damages in excess of $50,000.