(CNN) No criminal charges will be filed in relation to Prince's April 2016 death, Carver County attorney Mark Metz said in a news conference on Thursday.

Prince, who suffered from an opiate addiction, died of an accidental fentanyl overdose after taking counterfeit Vicodin pills that were laced with fentanyl, Metz said.

"Prince had no idea he was taking a counterfeit pill that could kill him," the attorney said.

There is no evidence showing how Prince obtained those counterfeit pills and no evidence as to their source, Metz said. Because of that, there will be no criminal charges filed in the case.

The announcement came nearly two years after Prince, the larger-than-life recording artist, was found unresponsive in an elevator at Paisley Park, his home and recording studio in Chanhassen, Minnesota. He was 57.

Fentanyl is a powerful painkiller about 30 to 50 times stronger than heroin.

"Prince's death is a tragic example that opioid addiction and overdose deaths do not discriminate, no matter the demographic," Metz said.

Prince's doctor settles civil allegations

Although there will be no criminal charges, the Minnesota physician who saw Prince twice in the weeks before the artist's death agreed to pay $30,000 to the United States to settle civil allegations that he prescribed drugs to someone else knowing that Prince would take them.

Dr. Michael Schulenberg prescribed the painkiller Percocet to Prince, but put the one-time prescription in the name of Kirk Johnson, Prince's former drummer and longtime friend, Metz said on Thursday. He made that decision to protect Prince's privacy, Metz said.

Schulenberg did not admit liability as part of the agreement, which settled what law enforcement officials contended was a civil violation of the Controlled Substances Act.

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

Amy S. Conners, Schulenberg's attorney, said in a statement the settlement was made "in order to avoid the expense, delay, and unknown outcome of litigation."

Conners said that Schulenberg affirmed he did not prescribe opiates to any patient with the intention that they be given to Prince.

"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."

F. Clayton Tyler, an attorney for Johnson, said Johnson was relieved that no charges have been filed against him.

"He continues to deny that he had anything to do with the death of his close friend, Prince," Tyler said in a statement obtained by CNN affiliate WCCO . "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."

'I'm outraged'

Photos: Prince: The artist Singer and songwriter Prince performs onstage during his Purple Rain Tour in 1984. The artist, who pioneered "the Minneapolis sound" and took on the music industry in his fight for creative freedom, died in April 2016 at age 57. Hide Caption 1 of 53 Photos: Prince: The artist Prince performs in New York in 1980. Prince won seven Grammy Awards, and earned 30 nominations. Five of his singles topped the charts and 14 other songs hit the Top 10. Hide Caption 2 of 53 Photos: Prince: The artist He performs at the Palladium in New York in 1981. Hide Caption 3 of 53 Photos: Prince: The artist Prince at the Lyceum in London in 1981. Hide Caption 4 of 53 Photos: Prince: The artist Prince and Apollonia Kotero in a scene from the movie "Purple Rain," which was released in 1984. Hide Caption 5 of 53 Photos: Prince: The artist Prince, seen here on set, won an Oscar for the original song score for the classic film. Hide Caption 6 of 53 Photos: Prince: The artist Prince performs in New York in 1984. Controversy followed the singer and that, in part, made his fans adore him more. His 1984 song, "Darling Nikki," details a one-night stand and prompted the formation of the Parents Music Resource Center. Led by Al Gore's then-wife, Tipper Gore, the group encouraged record companies to place advisory labels on albums with explicit lyrics. Hide Caption 7 of 53 Photos: Prince: The artist Prince performs at the Joe Louis Arena in Detroit in 1984. Hide Caption 8 of 53 Photos: Prince: The artist Prince performs live at the Fabulous Forum in 1985, in Inglewood, California. Hide Caption 9 of 53 Photos: Prince: The artist Prince in 1985. Hide Caption 10 of 53 Photos: Prince: The artist Prince, circa 1985. Hide Caption 11 of 53 Photos: Prince: The artist Prince performs live at the 1985 Fabulous Forum in Inglewood, California. He created what became known as the Minneapolis sound, which was a funky blend of pop, synth and new wave. Hide Caption 12 of 53 Photos: Prince: The artist Prince in the United Kingdom in the 1980s. Hide Caption 13 of 53 Photos: Prince: The artist Prince, circa 1985. Hide Caption 14 of 53 Photos: Prince: The artist Prince in a scene from the 1986 film "Under the Cherry Moon." Hide Caption 15 of 53 Photos: Prince: The artist Prince performs in London in 1986. Hide Caption 16 of 53 Photos: Prince: The artist Prince performs in London in 1986. Hide Caption 17 of 53 Photos: Prince: The artist Prince performs at London's Wembley Arena in 1986. Hide Caption 18 of 53 Photos: Prince: The artist Prince in 1987. Hide Caption 19 of 53 Photos: Prince: The artist Prince performs at Wembley Arena in London in 1988. Hide Caption 20 of 53 Photos: Prince: The artist The singer's predilection for lavishly kinky story-songs earned him the nickname "His Royal Badness." He is also known as the "Purple One" because of his colorful fashions. He is seen here in 1990. Hide Caption 21 of 53 Photos: Prince: The artist Prince performs in 1990. Hide Caption 22 of 53 Photos: Prince: The artist Prince, 1990. Hide Caption 23 of 53 Photos: Prince: The artist Prince performs during "The Nude Tour" in Birmingham, United Kingdom, in 1990. Hide Caption 24 of 53 Photos: Prince: The artist Prince listens to the crowd during a 1991 concert. Hide Caption 25 of 53 Photos: Prince: The artist Prince performs at the MTV Video Music Awards in Los Angeles in 1991. Hide Caption 26 of 53 Photos: Prince: The artist Prince performs at the Globe Arena in Stockholm in 1993. Hide Caption 27 of 53 Photos: Prince: The artist Prince arrives at the Ritz Hotel in Paris in 1994. Hide Caption 28 of 53 Photos: Prince: The artist A disguised Prince appears at a Virgin Records in London in 1995. Hide Caption 29 of 53 Photos: Prince: The artist As dozens of singers perform "We Are The World" on the 10th anniversary of the African famine relief anthem, the artist formerly known as Prince stands sucking on a lollipop next to Quincy Jones at the American Music Awards in Los Angeles in 1995. Hide Caption 30 of 53 Photos: Prince: The artist Prince poses for a photo in Toronto in 1996. Hide Caption 31 of 53 Photos: Prince: The artist Muhammad Ali pats Prince's head prior to a news conference where they were to announce plans for a benefit concert in 1997. Hide Caption 32 of 53 Photos: Prince: The artist Prince performs in 1998. Hide Caption 33 of 53 Photos: Prince: The artist A disguised Prince speaks at GQ magazine's third annual Men of the Year Awards in 1998. Hide Caption 34 of 53 Photos: Prince: The artist Prince, circa 1999. Hide Caption 35 of 53 Photos: Prince: The artist Prince performs in Hong Kong on October 17, 2003. Prince's concert was the the opening act in a four-week government-sponsored music festival titled "Hong Kong Harbor Fest," aimed at boosting the image of SARS-battered Hong Kong. Hide Caption 36 of 53 Photos: Prince: The artist Prince arrives with his then-wife, Manuela Testolini, for the 77th Academy Awards on February 27, 2005, in Los Angeles. Hide Caption 37 of 53 Photos: Prince: The artist Prince at the 2005 NAACP Image Awards in Los Angeles. Hide Caption 38 of 53 Photos: Prince: The artist Prince performs during a news conference for Super Bowl XLI in 2007. Hide Caption 39 of 53 Photos: Prince: The artist He left his imprint on many aspects of popular culture, from film to movies to sports to politics. As the Minnesota Vikings prepped to take on the New Orleans Saints in the 2010 NFC championship game, Prince wrote a fight song entitled "Purple and Gold" to inspire his home team. The Vikings lost. He was the half-time performer at the Super Bowl in 2007 in Miami Gardens, Florida, seen here. Hide Caption 40 of 53 Photos: Prince: The artist Prince performs onstage during the 2007 NCLR ALMA Awards. Hide Caption 41 of 53 Photos: Prince: The artist Prince performs on the runway at the spring/summer 2008 collection fashion show by Matthew Williamson during London Fashion Week in September 2007. Hide Caption 42 of 53 Photos: Prince: The artist Prince performs during his Welcome 2 America tour at Madison Square Garden in 2011 in New York. Hide Caption 43 of 53 Photos: Prince: The artist American pop legend Prince is pictured performing on the final night of the Hop Farm Music Festival in Kent, United Kingdom, in 2011. Hide Caption 44 of 53 Photos: Prince: The artist Prince performing at the Femoren on August 6, 2011, in Copenhagen, Denmark. Hide Caption 45 of 53 Photos: Prince: The artist Prince on stage with singer Mary J. Blige during the 2012 iHeartRadio Music Festival in Las Vegas. Hide Caption 46 of 53 Photos: Prince: The artist Prince presents the winner for Record of the Year to Gotye and Kimbra during the 55th Grammy Awards in 2013. Hide Caption 47 of 53 Photos: Prince: The artist A year later, Prince performs during the 2013 Billboard Music Awards in Las Vegas. Hide Caption 48 of 53 Photos: Prince: The artist Prince performs at the 2013 Skanderborg Festival in Denmark. Hide Caption 49 of 53 Photos: Prince: The artist Prince is seen in the stands during the 2014 French Open in Paris. Hide Caption 50 of 53 Photos: Prince: The artist Left to right: Zooey Deschanel, Prince, and Jake Johnson in a scene from the TV show "New Girl" which aired in 2014. Hide Caption 51 of 53 Photos: Prince: The artist Prince speaks at the 2015 Grammy Awards in Los Angeles. Additionally, last year, Prince released the song "Baltimore," addressing the unrest after the death of Freddie Gray while in police custody. He performed at a benefit concert in the city and gave a portion of the proceeds to youth groups in Baltimore. Hide Caption 52 of 53 Photos: Prince: The artist Prince tweeted his passport photo on February 11. The photo quickly took the Internet by storm. Hide Caption 53 of 53

Federal prosecutors and the Drug Enforcement Administration had opened an investigation into how Prince obtained the prescription medication, the agencies have said.

None of the medications found in Prince's home was prescribed to him , according to court documents unsealed in April 2017. Some bottles of opioid painkillers in his home were prescribed to Johnson, and other medications were found in vitamin bottles and envelopes, search warrants showed.

Charles "Chazz" Smith, Prince's cousin and drummer, said he was outraged by the decision.

"I know the DEA and the investigators and all of the law enforcement people went through Prince's house with a fine-tooth comb and conducted this investigation to the best of their abilities. My hat's off to them," he said.

"I'm not outraged at them. I'm outraged by people in Prince's inner circle not speaking up about what really happened. Those people who were around him when he died, they know what went on."

Prince, whose full name was Prince Rogers Nelson, had a complicated history with opioids, the addicting painkillers. The day before he died, his team had called an opioid addiction specialist in California seeking urgent help for him, an attorney working for the specialist and his son said in 2016.

Kim Berry, Prince's hairstylist, said she was surprised that no criminal charges were filed in the case.

"That person or the people responsible for it will have to answer to God," she said.