The near-fatal overdose that landed singer Demi Lovato in the hospital last month was likely caused by a fentanyl-laced batch of oxycodone, according to a new report.

TMZ reports the “Sorry Not Sorry” singer purchased the tainted drugs from a dealer around 4 a.m. on July 24 after celebrating a friend’s birthday in West Hollywood.

Lovato, 25, was unaware that the drugs contained fentanyl, as the dealer would often buy “dirty drugs” from Mexico, according to the gossip site.

The synthetic opioid is the same drug responsible for killing Prince and rapper Lil Peep. It is similar to morphine, but 50 to 100 times more potent, according to the National Institute on Drug Abuse.

Lovato suffered the apparent overdose July 24, and was reportedly revived with Narcan, which is used to reverse the effects of opioids.

Initial reports indicated she had overdosed on heroin, though conflicting reports later emerged saying it had been some type of methamphetamine.

The singer was hospitalized for two weeks before she was transferred to a rehab facility.

E! News reports that she is currently in Chicago working with a therapist, but will soon enter rehab for “several months,” and will undergo “an extensive program” to help her get and remain clean.

Lovato had six years of sobriety under her belt, but admitted in June that she had relapsed in the lyrics to her song “Sober.”

“What I’ve learned is that this illness is not something that disappears or fades with time. It is something I must continue to overcome and have not done yet,” she wrote on Instagram Aug. 5. “I now need time to heal and focus on my sobriety and road to recovery.”