According to a press release from the Ramsey, Minnesota, office, Prince's death was an accident caused by "fentanyl toxicity" and that "the decedent self-administered fentanyl." An opioid, Fentanyl is a controlled substance with a high risk for addiction and dependence that is used to treat severe pain.

Per the report, at the time of his death, Prince weighed 112 lbs., had scars on his left hip and lower part of his right leg and was wearing a black cap, black shirt, gray undershirt, black pants, black boxer-briefs and black socks.

Earlier on Thursday, a law enforcement source confirmed to the Associated Press on the condition of anonymity that opioid overdose was the cause of death, though they didn't specify fentanyl.

A source close to the investigation had previously told the Minneapolis Star Tribune that the prescription opiate painkiller Percocet was detected in the music legend's body, though at the time investigators did not yet know whether it played a role in his death.

The singer died on Thursday, April 21 in an elevator at his Paisley Park compound in Minnesota. Prince was said to be battling the flu ahead of his death, but it was later announced that investigators were looking into whether the singer died from a drug overdose.

DEA agents obtained a search warrant for Prince's Paisley Park estate in early May, revealing that Prince had met with a doctor at his home the day before he died. The papers did not disclose which illness Prince was diagnosed with, but indicated that the doctor had performed tests on the star and prescribed him with medication.

While Prince's longtime lawyer L. Londell McMillan insisted that the 57-year-old was "not on any drugs that would be cause for concern," and that he lived a clean lifestyle, sources confirmed to WHO that he had a history of using Percocet.

It was also revealed that Prince was expected to meet with an addiction specialist the day of his death after his representatives called California's Recovery Without Walls outpatient clinic to say he was "dealing with a grave medical emergency." Dr. Howard Kornfeld's attorney said during a May press conference that he and his son planned to advise Prince on treatment for a prescription drug addiction.

Prince's autopsy was performed on April 22 by Chief Medical Examiner A. Quinn Strobl of Midwest Medical Examiner's Office. After the autopsy was completed, his body was released back to his family, the medical examiner's office said.

A funeral for the singer is planned for August, his sister Tyka Nelson announced in May. The formal ceremony was preceded by a small, informal memorial at Paisley Park the weekend after the singer's April death.

The larger-than-life musician – known as much for his over-the-top showmanship as he was for his award-winning music – was born in Minneapolis and developed a love of music from his parents, who were both musicians. His 1984 album, Purple Rain, has long been lauded as one of the greatest albums of all time. He was inducted into the Rock & Roll Hall of Fame in 2004.