Video (01:42) : This video was taken by Carver County investigators the morning Prince was found dead inside Paisley Park. The Star Tribune has obscured images of Prince's body.

An “extensive, painstaking” two-year investigation into the overdose death of Prince is closing without criminal charges.

Carver County Attorney Mark Metz said Thursday that county, state and federal investigators were unable to determine who provided Prince Rogers Nelson with the massive dose of fentanyl — disguised as counterfeit prescription medication — that killed him on April 21, 2016, stunning his fans and sending shock waves through the music world.

Metz said there was no evidence that Prince or his associates knew that the pills he had taken, marketed under the trade name Vicodin, were counterfeits, or that anyone had conspired to kill him.

“There is no reliable evidence showing how Prince obtained the counterfeit Vicodin containing fentanyl,” he added. “The bottom line is that we simply do not have sufficient evidence to charge anyone with a crime related to Prince’s death.”

Mark Vancleave Video (16:12): Carver County Attorney Mark Metz announced Thursday that he was closing the two-year investigation into the death of Prince without issuing any criminal charges. Video (16:12): Carver County Attorney Mark Metz announced Thursday that he was closing the two-year investigation into the death of Prince without issuing any criminal charges.

The U.S. Attorney’s Office said prosecutors also found “no credible evidence” that would lead to any federal criminal charges. The case is now considered inactive.

The closing of the investigation freed a trove of documents including photos, videos, interview notes and tape-recorded statements from Prince’s closest associates and medical personnel who tried in the final days to help wean the 57-year-old musician from his dependence on painkillers.

The files contained a photo of Prince’s lifeless body outside of the Paisley Park elevator where he was found, as well as videos of Prince as he sought treatment at a Twin Cities-area clinic hours before his death.

Earlier Thursday, the U.S. Attorney’s Office announced that it had agreed to a civil settlement with Dr. Michael T. Schulenberg, the Twin Cities doctor who treated Prince twice in the days before his death and who once allegedly admitted that he knew that painkillers he had prescribed for Prince’s bodyguard and longtime associate, Kirk Johnson, would be used by the musician.

The settlement resolves possible controlled-substance violations uncovered during the death investigation. Terms call for Schulenberg to pay a $30,000 fine and be monitored over two years by the Drug Enforcement Administration. Neither Prince nor Johnson’s names appear in the settlement agreement, but federal search warrants executed after Prince’s body was discovered disclosed that the doctor admitted to writing prescriptions for Percocet in Johnson’s name, knowing that they were actually for Prince. Investigators do not suspect Schulenberg had any role in supplying the fentanyl that caused Prince’s death.

Schulenberg works at Fairview Clinics in New Brighton and has been licensed since 1997 in Minnesota.

The Star Tribune first reported that pills marked as prescription painkillers found at the death scene contained fentanyl and an autopsy revealed that Prince’s system contained so much of the drug it would have been fatal for anyone, regardless of their size or drug tolerance.

A federal search warrant application unsealed early Thursday disclosed that a medical examiner found 67 micrograms of fentanyl per liter of blood in Prince’s system — more than 22 times what would be found in a cancer patient who regularly wore a pharmaceutical fentanyl patch.

Amy Conners, an attorney for Schulenberg, said Thursday that the doctor maintained that he did not prescribe opioids to any patient with the intention that they be given to Prince. However, the U.S. attorney’s office contends that Schulenberg made a prescription “in the name of an individual, knowing that the controlled substances were intended to be used by another individual.”

“Doctors are trusted medical professionals and, in the midst of our opioid crisis, they must be part of the solution,” U.S. Attorney Greg Brooker said in a statement announcing the settlement. “As licensed professionals, doctors are held to a high level of accountability in their prescribing practices, especially when it comes to highly addictive painkillers.”

Conners said Schulenberg agreed to the settlement to avoid the “expense, delay, and unknown outcome of litigation.” The agreement noted that it was being reached “in compromise of disputed claims” by both parties.

“After he learned of Prince’s addiction, he immediately worked to refer Prince to a treatment facility and to transfer care to a chemical dependency specialist,” Conners said. “Dr. Schulenberg has previously disclosed all information regarding his care and treatment of Prince to his employers, law enforcement, and regulatory authorities in the course of his complete cooperation with all related investigations.”

The U.S. Attorney’s Office also agreed not to revoke or suspend Schulenberg’s DEA registration unless he violated his agreement with the DEA.

Metz said Thursday that after Prince’s death, investigators found dozens of counterfeit pills stamped in an “exact imitation” of Vicodin in his Paisley Park dressing room and in over-the-counter pill bottles on his nightstand that later tested for fentanyl.

But tracking the source of the fentanyl quickly proved difficult. Investigators combed through Prince’s computer and “all digital evidence” of the notoriously private musician in an attempt to find the source of the pills. Metz said authorities were hamstrung by the fact that Prince didn’t own a cellphone, which might have recorded the phone numbers or texts used to buy the painkillers.

Dr. Michael T. Schulenberg, the Twin Cities doctor who treated Prince twice in the days before his death.

As part of their investigation, authorities looked closely at Schulenberg’s prescribing history. Schulenberg, who was Johnson’s doctor, allegedly told officers at the death scene that he agreed to write a prescription for 15 tablets of Percocet, a form of oxycodone, intended for Prince but made out in Johnson’s name on April 14.

According to search warrants, Schulenberg told officers that Johnson asked him to prescribe pain medication to Prince because the musician was experiencing hip pain and had a concert that night in Atlanta — a show that would be notable for being Prince’s last full concert.

On the return trip to the Twin Cities, Prince’s private plane made an emergency landing in Moline, Ill., after Prince passed out. Paramedics revived him on the tarmac, and he recovered after two shots of naloxone, an overdose antidote often referred to by its brand name Narcan. Johnson told doctors in Moline that Prince may have taken Percocet.

But Metz said Thursday that investigators believe Prince also likely took the counterfeit Vicodin before he passed out. Prince was suffering from an opioid overdose but refused treatment at the hospital.

Schulenberg told investigators that three days after the emergency landing, or four days before Prince died, Johnson sent a text message asking Schulenberg to call him. During the call, Schulenberg told investigators, Johnson expressed concerns about Prince’s opioid use and apologized for asking Schulenberg to prescribe Percocet for Prince.

As part of the settlement this week, Schulenberg also entered into an agreement with the DEA under which he agreed to comply with a two-year period of heightened compliance for logging and reporting of all of his prescriptions of controlled substances — including quantity, strength, dosage and diagnoses. DEA personnel can also enter Schulenberg’s office without notice at any time during business hours.

Schulenberg must also submit logs on a quarterly basis and allow the DEA access to his prescribing history through Minnesota’s Prescription Monitoring Program and provide a prescribing history report to the DEA from the Minnesota Board of Pharmacy.

Brooker, meanwhile, wrote a letter to Schulenberg’s attorneys, Conners and Thomas Heffelfinger, this week clarifying that the doctor is not the target of a criminal investigation.

Medical records indicated that Schulenberg also examined Prince a day before his death, according to one federal search warrant. The musician reported feeling “antsy” and thought it may be related to having stopped taking Tylenol that morning. Prince didn’t know if the Tylenol had other ingredients, Schulenberg said. But Schulenberg’s notes indicated that “independent sources of history” reported Prince’s Tylenol as containing hydrocodone. A urinalysis on Prince also tested positive for opioids.

The records also show Schulenberg expressed concern that Prince could be suffering from opioid withdrawal.

A blood test on the day before Prince’s death showed no evidence of fentanyl, a medical examiner later told an investigator.

Federal search warrants described DEA investigators seeking evidence of federal drug crimes including distribution and conspiracy charges.

On Thursday, Johnson’s attorney, F. Clayton Tyler, said his client was relieved to learn that no charges had been filed against him.

“He continues to deny that he had anything to do with the death of his close friend, Prince,” Tyler said. “Prince’s death was a tragedy that few could experience more deeply than Kirk Johnson. Today’s decision affirms his innocence, and he will continue to mourn and honor his friend every day.”

Several of Prince’s siblings, who are considering a wrongful death suit, declined to comment Thursday on the close of the investigation. Meanwhile, a few fans attending Metz’s news conference expressed disappointment that the source of the fentanyl was never found.

Speaking afterward, Gary Schmitz, who sported a T-shirt depicting Prince riding a Segway, said he’d hoped for a different outcome. “I just hope no one lied to protect someone,” the retired mechanical inspector from Shakopee said. “They can’t keep the secret forever.”

Star Tribune staff writers Dan Browning, Liz Sawyer and David Chanen contributed to this report.