Numerous opioid painkillers were found at US singer Prince's home shortly after his death last year, unsealed court documents show.
Some of the pills discovered at Prince's Paisley Park estate in Minnesota had prescriptions in the name of his friend and bodyguard.
But the documents do not offer evidence about the source of the fentanyl that killed the singer on 21 April 2016.
Medical examiners have concluded that he died from an accidental overdose.
No-one has been charged over the death of the 57-year-old singer.
The court documents were kept sealed until Monday because prosecutors feared potential witnesses might flee or potential evidence be destroyed.
They show that some of the pills found at Prince's home were labelled "Watson 853" - the opioid painkiller acetaminophen-hydrocodone.
They are used in the treatment of pain, rheumatoid arthritis and coughs.
The unsealed documents also show that other "numerous narcotic controlled substance pills" were discovered in various containers, including vitamin bottles.
Investigators were "made aware by witnesses that were interviewed, that Prince recently had a history of going through withdrawals, which are believed to be the result of the abuse of prescription medication," the documents say.
They confirm last year's media reports that painkillers were in the singer's possession following his death.
According to the post-mortem report, Prince self-administered fentanyl, an opioid many times more powerful than heroin.
Prince was found unresponsive in a lift at his complex.
He was a prolific writer and performer from a young age, reportedly writing his first song when he was seven.
A singer, songwriter, arranger and multi-instrumentalist, Prince recorded more than 30 albums. His best known hits include Let's Go Crazy and When Doves Cry.