Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Music legend Prince died after taking what he thought was Vicodin but was actually a counterfeit painkiller that was laced with fentanyl, a Minnesota prosecutor said Thursday in announcing that he would not be filing criminal charges in Prince's death.

"In all likelihood, Prince had no idea he was taking a counterfeit pill that could kill him," Carver County Attorney Mark Metz said at a news conference in Chaska. "Others around Prince also likely did not know that the pills were counterfeit containing fentanyl."

Despite an intensive investigation, "there is no reliable evidence showing how Prince obtained the counterfeit Vicodin laced with fentanyl" or who was involved in procuring those pills, Metz said.

Prince, 57, was found unresponsive at his Paisley Park estate on April 21, 2016, in Chanhassen, Minnesota. He was killed by an accidental overdose of fentanyl, according to Minnesota health officials.

"The evidence demonstrates that Prince thought he was taking Vicodin and not fentanyl," Metz said.

Before announcing the decision not to pursue charges, Metz said that he was "mindful that this is a most unusual and extraordinary case involving a world-famous celebrity" but that he could not factor that into his charging decision.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"Prince's death is a tragic example that opioid addiction, and overdose deaths do not discriminate no matter the demographic," he said, expressing condolences to Prince's family and fans.

Metz said that Prince had been "experiencing significant pain" and had been taking pain medication for a number of years and that investigators found prescription medications throughout his home, many not in the original container provided by a pharmacy. Prince had no known Vicodin or fentanyl prescription, he said.

"There is no evidence that the pill or pills that actually killed Prince were prescribed by a doctor. There is also no evidence to suggest any other sinister motive, intent or conspiracy to murder Prince," he said. "The evidence suggest that Prince had long suffered significant pain, became addicted to pain medications but took efforts to protect his privacy."

Metz said there was also no evidence that anyone associated with Prince knew he had the counterfeit pills containing fentanyl.

Last month, a toxicology report showed that Prince had what experts called "exceedingly high" concentrations of fentanyl in his body. Fentanyl, a synthetic opioid up to 50 times stronger than heroin, is behind the nationwide surge in overdoses in recent years.

Prince, whose full name was Prince Rogers Nelson, was found in an elevator at his estate when the son of a doctor at a drug rehabilitation center in California arrived in response to a call the day before from a Prince representative who reported a "grave medical emergency" related to prescription pain medication, the facility's attorney said at the time.

Prince was also being treated by Dr. Michael Schulenberg, a Minneapolis geriatrician, for opioid withdrawal, anemia and fatigue, a source with knowledge of his treatment told NBC News in 2016.

The Associated Press reported earlier Thursday that Schulenberg, the doctor accused of illegally prescribing an opioid painkiller for Prince a week before he died, has agreed to pay $30,000 to settle a federal civil violation, citing documents.

Schulenberg is not a target of any criminal investigation, federal prosecutors said in a letter to his attorney, according to the AP. His attorney, Amy Conners, released a statement Thursday saying, "There have been no allegations made by the government that Dr. Schulenberg had any role in Prince’s death."

Conners said Schulenberg decided to settle the claims "in order to avoid the expense, delay and unknown outcome of litigation."

"He made no admission of facts nor liability and denies any such liability," she said in the statement.

Prince's cousin and drummer, Charles "Chazz" Smith, told reporters Thursday afternoon that he was "not happy" about the decision not to file charges.

Smith said he understood that investigators did all they could do, but he added, "There's got to be some reason why, and someone should be held accountable."

"We didn't know that our cousin was suffering like that," he said.