EXCLUSIVE

R. Kelly's Lawyer on Kim Foxx Out of Line with 'Pedo' Comment ... Avenatti Weighs In

11:34 AM PT -- Michael Avenatti has waded into the Jussie Smollett drama down in Chicago, saying he almost got directly involved when the case was at its peak in February. Avenatti explains -- in a statement he posted and then deleted from Twitter -- that counsel for the Osundairo brothers reached out to him to see if he could potentially help 'em out.

Avenatti says he ultimately declined, but along the way ... he says he reached out to Kim Foxx to give her a heads-up about his possible involvement as a courtesy. He insists there's nothing improper about this, as he claims it's routine.

There's more -- Avenatti goes on to slam R. Kelly's attorney, Steven Greenberg, saying SG is trying to muck up the Kelly case by personally attacking Avenatti over his own legal woes. What's more, Avenatti says Greenberg is "attempting to create a smokescreen to distract away from the mountain of evidence" Avenatti claims the Cook County State Attorney has against the singer to prove he abused underage girls.

Avenatti says the evidence will speak for itself, adding that he hopes Kim Foxx and co. will bring justice to Kelly's alleged victims. He goes further in praising her, saying she and her staff are "extremely professional, unbiased and focused on the delivery of justice."

It's almost a word-for-word counter to Greenberg's claim that Foxx's office is barely functioning in chaos in the ongoing fallout of the since-dismissed Jussie case.

R. Kelly's legal team thinks Kim Foxx calling the singer a "pedophile" before he's even been given a fair trial is a clear look into how her office is run ... totally dysfunctional.

Kelly's attorney, Steven Greenberg, tells TMZ ... Foxx's texts to a fellow staffer -- in which she implicitly referred to his client as a pedo in comparing his case to Jussie Smollett's -- was outrageous, considering Kelly hasn't been convicted of any such crime.

Greenberg says Foxx is letting her personal biases color the way she characterizes Kelly's case -- which she implied was a way bigger deal than Jussie's in her correspondence that was made public Tuesday.

As we reported ... Foxx called Jussie a "washed up celeb" who'd been slapped with 16 felony counts, while going on to indirectly compare that to R. Kelly only getting charged with 10 counts ... saying there was a discrepancy there as far as priorities go.

Of course, her office ultimately dropped all the charges against Jussie.

Greenberg tells us that the fact that Foxx is even having these types of conversations with her staff in this manner paints a larger picture about the Cook County State Attorney's Office ... he calls it "dysfunctional and chaotic." He also thinks Foxx lacks objectivity.

That said, Greenberg says he isn't calling for Foxx to be removed from the Kelly case just yet. He tells us there's evidence and discovery he wants to get his hands on first before doing anything.

Greenberg adds ... once he and his team get everything they need, they'll make a decision on what to ask as far as Foxx's involvement is concerned.

Originally Published -- 8:57 AM PT

Click here for info about our online advertising practices.