Credit: Neil Lupin/Redferns

The Midwest Medical Examiner’s office released an official statement Thursday, revealing that Prince died of an accidental fentanyl overdose. The Associated Press first reported the news.

The musician died April 21 at his Minnesota home and studio, Paisley Park. He was 57.

Prince was hospitalized less than a week before his death for what his reps said was the flu. After his death, the Midwest Medical Examiner’s Office performed an autopsy and said in a statement, “Gathering the results will take several days and the results of a full toxicology scan could likely take weeks.”

Following his death, Dr. Howard Kornfeld, the medical director of a California outpatient addiction clinic, revealed to the Minneapolis Star Tribune through Attorney William Mauzy that he had plans to fly to Minneapolis April 22 to devise a treatment plan for the star. Kornfeld’s son, Andrew, ended up going in his father’s place, and arrived at Prince’s house the morning of April 21. Mauzy says Andrew was the one who found Prince unconscious and called 911. He later turned over some Suboxone, a drug intended to relieve opioid cravings, that he was planning on giving to Prince.

Fentanyl is an opioid, a class of drugs that also includes prescriptions painkillers like hydrocodone, oxycodone, and morphine, as well as heroin. According to the Centers for Disease Control and Prevention, opioids are responsible for the majority of fatal drug overdoses. In 2014 alone, more than 14,000 Americans died from prescription opioid overdoses.

Friends and family held a private memorial and a “musical celebration” for Prince in the days after his death. According to court documents filed by Prince’s sister Tyka Nelson, the iconic rocker didn’t leave a will and the value of his estate is somewhat in dispute. See the report from the medical examiner’s office below.