EXCLUSIVE

Demi Lovato Alleged Dealer Busted with Guns and Drugs ... Months Before OD

The man who showed up at Demi Lovato's home and allegedly smoked drugs with her hours before her OD is no stranger to the law -- cops nabbed him in a huge bust one month before he connected with the singer.

Brandon Johnson was arrested back in March with a stash of guns, drugs and cash ... according to law enforcement. When cops picked him up in North Hollywood he allegedly had narcotics, a fully loaded semi-automatic handgun and $10k in his pocket.

Officers then searched Johnson's home and say they discovered more guns, drugs and ammo. He was also arrested in June and charged with DUI and possession of cocaine.

TMZ broke the story ... Demi had been in contact with Johnson since April, and sources say he had supplied her with drugs.

We're also told Johnson is the man Demi texted to come over at 4 AM the morning she overdosed after freebasing Oxycodone potentially laced with fentanyl.

A source connected to Brandon tells us he's been telling friends he and Demi have had a "romantic relationship" but other sources say there was no romantic relationship. We're also told he denies "dealing" her drugs.

We're told the D.A. has not charged him yet for the March arrest.

Click here for info about our online advertising practices.