Prince waves goodbye at the 2014 French Open

The doctor who supplied megastar Prince Rogers Nelson with an opioid narcotic wasn’t on a federal list to prescribe opioids.

Dr. Michael Todd Schulenberg was named in a federal affidavit as part of an ongoing Federal Drug Enforcement Administration (DEA) investigation into the singer’s sudden death on April 21.

Schulenberg was on his way to see Prince when he died mysteriously in an elevator in the studio on his sprawling property in Minnesota.

Buprenorphine is an opioid that is used to wean opioid addicts from their narcotic addictions.

Prince reportedly had an appointment to meet with Schulenberg to help him with his narcotic addiction.

NY Daily News — Dr. Michael Todd Schulenberg isn’t on the federal list of doctors allowed to prescribe buprenorphine, the opioid medication that California addiction specialist Dr. Howard Kornfeld sent on an overnight flight to Minneapolis in the hours before Prince died.

That grim discovery was made by a small group that included Andrew Kornfeld, the son of Dr. Kornfeld. It was Andrew who called 911 and had the buprenorphine pills in his backpack, his lawyer said.

The group also included Prince’s female assistant, a legal source told the Daily News on Tuesday.

Federal Drug Enforcement Administration investigators are now probing Prince’s death for possible criminal acts, the source confirmed.