A Utah man busted for allegedly dealing drugs told cops he was only selling so he could pay for an attorney to help fight an earlier rape case, according to a new report.

Jayce McKay Crook, 24, was charged Monday with pot distribution and possession of drug paraphernalia after a sting by undercover officers in Provo, according to KSL.

“On the way to the jail, the defendant said he was only selling marijuana so that he could pay for his attorney in a pending rape case,” charging documents stated, according to the report.

Crook was charged in May with rape and sexual battery for an alleged attack in 2018, the report said. He was due in court for that case on Tuesday. He was also on probation over a drug distribution conviction from March.

After the latest bust, also lied to probation officers about his address — leading cops to bust into the wrong apartment with guns drawn on four innocent men, the documents allege.

“By providing AP&P and detectives the wrong address and failing to say anything prior to detectives entering the home, Jayce placed the lives of four individuals at risk of serious injuries or even death,” the affidavit states, according to KSL.