Prince received treatment for an overdose of the prescription painkiller Percocet about a week before his death on Thursday, sources told TMZ.

Last Friday, while flying home after a show in Atlanta, Prince's plane made an emergency landing in Moline, Ill. Prince's reps said he had the flu and was otherwise fine, but unnamed sources in Moline told TMZ that Prince received naloxone, also known as Narcan, a drug administered to save people who have overdosed on opioids, in the hospital there. He left the hospital three hours later. He made a public appearance on Sunday, telling reporters,"Wait a few days before you waste any prayers."

TMZ later reported that Prince overdosed on Percocet, a highly addictive painkiller made from oxycodone. Prince had hip surgery in 2010 and had been walking with a cane in recent years, so it's possible he began taking Percocet to deal with pain after the surgery.

Prince (1958-2016): Our complete coverage — galleries, videos and more

Variety published the transcript of the 911 call made from Paisley Park reporting Prince's death.

Official sources have not yet confirmed the cause of death. An autopsy is being performed Friday.