Demi Lovato's alleged drug dealer was reportedly arrested just a month before her suspected overdose.

The man who allegedly supplied the 25-year-old singer with the drugs - thought to be Oxycodone possibly laced with fentanyl - that reportedly caused her to lose consciousness three weeks ago was busted in June and charged with driving under the influence (DUI) and being in possession of cocaine.

A few months prior to that he was arrested in North Hollywood, California, after he was allegedly found in possession of narcotics, a fully loaded semi-automatic handgun and $10,000 in his pocket.

Police then searched his home and allegedly found more guns and drugs, but he's yet to be charged.

It's believed Demi had been in contact with the dealer since April and contacted him via text message in the early hours of July 24 asking him to join her at her home in Hollywood Hills after a party.

The pair then allegedly smoked the painkiller Oxycodone ''on tin foil'' combined with the depressant drug - the same medication that killed Prince - before they both drifted off to sleep at her mansion.

The dealer allegedly fled the scene when he noticed that the 'Sorry Not Sorry' hitmaker was breathing heavily in bed and it wasn't until 11:30 the next morning that her staff found her unconscious.

Paramedics were called to Demi's home immediately and Narcan - a medication used to block the effects of opioids, especially in overdose - was administered.

She was then rushed to hospital and spent two weeks there recovering, during which time she suffered severe complications, before she checked herself into rehab.

A source close to the dealer has told TMZ that he's been telling people he was in a ''romantic relationship'' with Demi prior to her overdose and he's adamant he never sold her any drugs.